1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#!/bin/sh
# Copyright (C) 2018, 2025 Tommi Höynälänmaa
# Distributed under GNU General Public License version 3,
# see file doc/GPL-3.
examplesdir=$(get-theme-d-config-var examples-dir)
testsdir=$(get-theme-d-config-var tests-dir)
toolsdir=$(get-theme-d-config-var tools-dir)
targetdir=theme-d-test-env
if [ -e $targetdir ] ; then
echo "Target directory exists. Doing nothing." ;
exit 1 ;
fi
if [ "$examplesdir" = "" -o "$testsdir" = "" -o "$toolsdir" = "" ] ; then
echo "Directories could not be computed. Doing nothing." ;
exit 1 ;
fi
mkdir $targetdir
mkdir $targetdir/testing
mkdir $targetdir/testing/output
mkdir $targetdir/theme-d-code
mkdir $targetdir/theme-d-code/examples
mkdir $targetdir/theme-d-code/tests
cp $toolsdir/check-test-compilation.scm $targetdir/testing/
cp $toolsdir/check-test-program-linking.scm $targetdir/testing/
cp $toolsdir/check-test-module-linking.scm $targetdir/testing/
cp $toolsdir/check-test-runs.scm $targetdir/testing/
cp $toolsdir/check-test-runs-m.scm $targetdir/testing/
cp $toolsdir/compile-tests.scm $targetdir/testing/
cp $toolsdir/link-test-programs.scm $targetdir/testing/
cp $toolsdir/link-to-modules.scm $targetdir/testing/
cp $toolsdir/run-test-programs.scm $targetdir/testing/
cp $toolsdir/run-test-programs-w-output.scm $targetdir/testing/
cp $toolsdir/run-test-programs-m.scm $targetdir/testing/
cp $toolsdir/run-test-programs-w-output-m.scm $targetdir/testing/
cp $toolsdir/compare-output.sh $targetdir/testing/
cp $toolsdir/clean-test-env.sh $targetdir/testing/
cp $toolsdir/link-clean-test-env.sh $targetdir/testing/
cp $examplesdir/*.th? $targetdir/theme-d-code/examples/
cp $examplesdir/*.mk $targetdir/theme-d-code/examples/
cp $examplesdir/run-programs.sh $targetdir/theme-d-code/examples/
cp $examplesdir/run-programs-mod.sh $targetdir/theme-d-code/examples/
cp $examplesdir/compute-example-program-deps.sh $targetdir/theme-d-code/examples/
cp $examplesdir/compute-example-target-module-deps.sh $targetdir/theme-d-code/examples/
cp $examplesdir/compute-pcode-module-deps.sh $targetdir/theme-d-code/examples/
cp $testsdir/test*.th? $targetdir/theme-d-code/tests/
cp $testsdir/test*.out $targetdir/theme-d-code/tests/
cp $testsdir/aux*.txt $targetdir/theme-d-code/tests/
cp $testsdir/mod1.tc? $targetdir/theme-d-code/tests/
cp $testsdir/numerical-test-env.th? $targetdir/theme-d-code/tests/
cp $testsdir/numerical-test-env.tc? $targetdir/theme-d-code/tests/
cp $testsdir/matrix-test-env.th? $targetdir/theme-d-code/tests/
cp $testsdir/matrix-test-env.tc? $targetdir/theme-d-code/tests/
cd $targetdir/theme-d-code/tests
theme-d-link --module -M ..: numerical-test-env.tci
theme-d-link --module -M ..: numerical-test-env.tcb
theme-d-link --module -M ..: matrix-test-env.tci
theme-d-link --module -M ..: matrix-test-env.tcb
|