mirror of
https://github.com/hohn/codeql-workshop-dataflow-c.git
synced 2025-12-16 18:43:03 +01:00
Initial commit
This commit is contained in:
33
initialize-qltests.sh
Executable file
33
initialize-qltests.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script copies the test_part1.c, test_part2.c, and test_part3.c files
|
||||
# from the tests-common directory to the appropriate directories in the
|
||||
# solutions-tests and exercises-tests directories.
|
||||
[[ $(git rev-parse --show-toplevel) == $(pwd) ]] || {
|
||||
echo "This script must be run from the root of the workshop repository."
|
||||
exit 1
|
||||
}
|
||||
|
||||
SRCDIR=$(pwd)/tests-common
|
||||
|
||||
target_dirs=(
|
||||
$(pwd)/solutions-tests
|
||||
$(pwd)/exercises-tests
|
||||
)
|
||||
|
||||
for dir in "${target_dirs[@]}"; do
|
||||
# copy test-part1.c to the Exercise1-Exercise6 directories
|
||||
for i in {1..6}; do
|
||||
cp $SRCDIR/test_part1.c $dir/Exercise$i/test.c
|
||||
done
|
||||
# copy test-part2.c to the Exercise7-Exercise11 directories
|
||||
for i in {7..12}; do
|
||||
cp $SRCDIR/test_part2.c $dir/Exercise$i/test.c
|
||||
done
|
||||
# copy test-part3.c to the Exercise13-Exercise15 directories
|
||||
# for i in {13..15}; do
|
||||
# cp $SRCDIR/test_part3.c $dir/Exercise$i/test.c
|
||||
# done
|
||||
done
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user