diff --git a/test/CTestTestfile.cmake b/test/CTestTestfile.cmake index 4709c7e..e5bc1c6 100644 --- a/test/CTestTestfile.cmake +++ b/test/CTestTestfile.cmake @@ -100,8 +100,6 @@ ADD_TEST(compile_only_tuple_args "scripts/compile_only" "good/tuple_args.ept") ADD_TEST(compile_only_type_alias "scripts/compile_only" "good/type_alias.ept") ADD_TEST(compile_only_updown "scripts/compile_only" "good/updown.ept") ADD_TEST(compile_only_when_merge1 "scripts/compile_only" "good/when_merge1.ept") -SET_TEST_PROPERTIES(compile_only_t2 PROPERTIES DEPENDS compiler_only_t1) -SET_TEST_PROPERTIES(compile_only_t2open PROPERTIES DEPENDS compiler_only_t1) ADD_TEST(compile_gcc_run_alloc "scripts/compile_gcc_run" "good/alloc.ept") ADD_TEST(compile_gcc_run_array1 "scripts/compile_gcc_run" "good/array1.ept") ADD_TEST(compile_gcc_run_array2 "scripts/compile_gcc_run" "good/array2.ept") @@ -173,5 +171,7 @@ ADD_TEST(compile_gcc_run_tuple_args "scripts/compile_gcc_run" "good/tuple_args.e ADD_TEST(compile_gcc_run_type_alias "scripts/compile_gcc_run" "good/type_alias.ept") ADD_TEST(compile_gcc_run_updown "scripts/compile_gcc_run" "good/updown.ept") ADD_TEST(compile_gcc_run_when_merge1 "scripts/compile_gcc_run" "good/when_merge1.ept") +SET_TEST_PROPERTIES(compile_only_t2 PROPERTIES DEPENDS compiler_only_t1) +SET_TEST_PROPERTIES(compile_only_t2open PROPERTIES DEPENDS compiler_only_t1) SET_TEST_PROPERTIES(compile_gcc_run_t2 PROPERTIES DEPENDS compiler_gcc_run_t1) SET_TEST_PROPERTIES(compile_gcc_run_t2open PROPERTIES DEPENDS compiler_gcc_run_t1) diff --git a/test/gen_ctests b/test/gen_ctests index 89f5833..e0834fc 100755 --- a/test/gen_ctests +++ b/test/gen_ctests @@ -8,12 +8,13 @@ for i in good/*.ept; do echo 'ADD_TEST(compile_only_'`basename $i .ept` '"scripts/compile_only"' '"'$i'")' done -echo 'SET_TEST_PROPERTIES(compile_only_t2 PROPERTIES DEPENDS compiler_only_t1)' -echo 'SET_TEST_PROPERTIES(compile_only_t2open PROPERTIES DEPENDS compiler_only_t1)' - for i in good/*.ept; do echo 'ADD_TEST(compile_gcc_run_'`basename $i .ept` '"scripts/compile_gcc_run"' '"'$i'")' done + + +echo 'SET_TEST_PROPERTIES(compile_only_t2 PROPERTIES DEPENDS compiler_only_t1)' +echo 'SET_TEST_PROPERTIES(compile_only_t2open PROPERTIES DEPENDS compiler_only_t1)' echo 'SET_TEST_PROPERTIES(compile_gcc_run_t2 PROPERTIES DEPENDS compiler_gcc_run_t1)' echo 'SET_TEST_PROPERTIES(compile_gcc_run_t2open PROPERTIES DEPENDS compiler_gcc_run_t1)' diff --git a/test/scripts/compile_fail b/test/scripts/compile_fail index f1415be..a87c0dd 100755 --- a/test/scripts/compile_fail +++ b/test/scripts/compile_fail @@ -1,20 +1,6 @@ #!/bin/bash -checkdir=_check_builds - -shopt -s nullglob - -# script de test - -COMPILER_DIR="../compiler" -if [ -x $COMPILER_DIR/heptc.native ]; -then - COMPILER=heptc.native -else - COMPILER=heptc.byte -fi - -HEPTC=../$COMPILER_DIR/$COMPILER +source scripts/config progpath=$1 shift diff --git a/test/scripts/compile_gcc_run b/test/scripts/compile_gcc_run index 0e0747c..ecf6476 100755 --- a/test/scripts/compile_gcc_run +++ b/test/scripts/compile_gcc_run @@ -1,24 +1,6 @@ #!/bin/bash -checkdir=_check_builds - -shopt -s nullglob - -# script de test - -COMPILER_DIR="../compiler" -if [ -x $COMPILER_DIR/heptc.native ]; -then - COMPILER=heptc.native -else - COMPILER=heptc.byte -fi - -HEPTC=../$COMPILER_DIR/$COMPILER -CC="gcc -std=c99 -I ../../../lib/c" -LD="gcc" -NBSTEP=100 - +source scripts/config progpath=$1 shift diff --git a/test/scripts/compile_only b/test/scripts/compile_only index 07f0270..f044a97 100755 --- a/test/scripts/compile_only +++ b/test/scripts/compile_only @@ -1,20 +1,6 @@ #!/bin/bash -checkdir=_check_builds - -shopt -s nullglob - -# script de test - -COMPILER_DIR="../compiler" -if [ -x $COMPILER_DIR/heptc.native ]; -then - COMPILER=heptc.native -else - COMPILER=heptc.byte -fi - -HEPTC=../$COMPILER_DIR/$COMPILER +source scripts/config progpath=$1 shift diff --git a/test/scripts/config b/test/scripts/config new file mode 100644 index 0000000..9ba0ce3 --- /dev/null +++ b/test/scripts/config @@ -0,0 +1,19 @@ + +checkdir=_check_builds + +shopt -s nullglob + +# script de test + +COMPILER_DIR="../compiler" +if [ -x $COMPILER_DIR/heptc.native ]; +then + COMPILER=heptc.native +else + COMPILER=heptc.byte +fi + +HEPTC=../$COMPILER_DIR/$COMPILER +CC="gcc -std=c99 -I ../../../lib/c" +LD="gcc" +NBSTEP=100