Add non-auto tests

This commit is contained in:
project-repo 2023-04-06 21:32:42 +02:00
commit 9c2aa86182
6 changed files with 28 additions and 0 deletions

View file

@ -355,3 +355,4 @@ test('Scan-build (static analysis)', find_program('test/scan-build'), env : [ ''
test('Arguments', find_program('test/arguments'), args : [ meson.project_version() ], env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'basic')
test('Environment Variables', find_program('test/environment-variables'), env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'basic')
test('Semantic versioning', find_program('test/versions'), args : [ meson.project_version() ], env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'release')
test('Non-auto tests', find_program('test/non-auto-tests'), args : [ meson.project_version() ], env : [ ''.join('MESONCURRENTCONFIGDIR=', meson.current_source_dir()) ], suite: 'release')

View file

View file

View file

View file

@ -0,0 +1,2 @@
2.1.0
2023-04-06

25
test/non-auto-tests Normal file
View file

@ -0,0 +1,25 @@
#!/bin/bash
# Copyright 2023, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
VERSION=$1
RESULT=0
# shellcheck disable=2164
cd "${MESONCURRENTCONFIGDIR}/release-non-auto-checks"
filevar="$VERSION
$(date +%Y-%m-%d)"
for check in ./*
do
if [[ $(cat "$check") = "${filevar}" ]]
then
echo "[x] ${check}"
else
RESULT=1
echo "[ ] ${check}"
fi
done
exit "${RESULT}"