Minimal sanity test
This commit is contained in:
parent
70e402f582
commit
16948fbd9c
|
@ -14,13 +14,6 @@
|
|||
## You should have received a copy of the GNU General Public License
|
||||
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Generated files
|
||||
tape_01
|
||||
tape_02
|
||||
|
||||
# Directories storing data that should be ignored
|
||||
bin/
|
||||
temp/
|
||||
test/scratch/
|
||||
scratch/
|
||||
|
||||
test/*/tmp/
|
||||
|
|
11
makefile
11
makefile
|
@ -16,8 +16,8 @@
|
|||
## along with M2-Mesoplanet. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Prevent rebuilding
|
||||
VPATH = bin:test:test/results
|
||||
PACKAGE = m2-planet
|
||||
VPATH = bin
|
||||
PACKAGE = m2-mesoplanet
|
||||
|
||||
# C compiler settings
|
||||
CC?=gcc
|
||||
|
@ -40,7 +40,7 @@ M2-Mesoplanet: bin results cc.h cc_reader.c cc_core.c cc.c cc_globals.c cc_globa
|
|||
# Clean up after ourselves
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf bin/ test/results/
|
||||
rm -rf bin/
|
||||
# ./test/test0000/cleanup.sh
|
||||
|
||||
# Directories
|
||||
|
@ -51,8 +51,9 @@ results:
|
|||
mkdir -p test/results
|
||||
|
||||
# tests
|
||||
test: aarch64-tests amd64-tests knight-posix-tests knight-native-tests armv7l-tests x86-tests | results
|
||||
sha256sum -c test/test.answers
|
||||
test: M2-Mesoplanet
|
||||
./test/test0000/run_test.sh
|
||||
# sha256sum -c test/test.answers
|
||||
|
||||
|
||||
# Generate test answers
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
e98ce4032c30d918c1fc4f7132567af790692e1a87123c5843f0001fc24447ad test/test0000/tmp/return.c
|
|
@ -0,0 +1,21 @@
|
|||
/* Copyright (C) 2016 Jeremiah Orians
|
||||
* This file is part of M2-Planet.
|
||||
*
|
||||
* M2-Planet is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* M2-Planet is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
int main()
|
||||
{
|
||||
return 42;
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
#! /bin/sh
|
||||
## Copyright (C) 2017 Jeremiah Orians
|
||||
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
|
||||
## This file is part of M2-Planet.
|
||||
##
|
||||
## M2-Planet is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## M2-Planet is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -x
|
||||
|
||||
TMPDIR="test/test0000/tmp"
|
||||
|
||||
mkdir -p ${TMPDIR}
|
||||
|
||||
# Build the test
|
||||
bin/M2-Mesoplanet \
|
||||
-f test/test0000/return.c \
|
||||
-o ${TMPDIR}/return.c \
|
||||
|| exit 1
|
||||
|
||||
sha256sum -c test/test0000/proof.answer || exit 2
|
||||
exit 0
|
Loading…
Reference in New Issue