From d6b19a564052f2e7b6e1bb6f3eea156013ff027c Mon Sep 17 00:00:00 2001 From: Andreas Resch Date: Tue, 2 Jan 2024 19:48:28 +0100 Subject: [PATCH] regenerate bash scripts --- .../templates/aeolus/assembler/default.sh | 46 +++++----- src/main/resources/templates/aeolus/c/fact.sh | 42 ++++----- src/main/resources/templates/aeolus/c/gcc.sh | 88 +++++++++--------- .../templates/aeolus/c/gcc_static.sh | 92 +++++++++---------- .../templates/aeolus/haskell/default.sh | 6 +- .../aeolus/haskell/default_sequential.sh | 12 +-- .../templates/aeolus/java/plain_gradle.sh | 6 +- .../aeolus/java/plain_gradle_sequential.sh | 2 +- .../aeolus/java/plain_gradle_static.sh | 2 +- .../java/plain_gradle_static_coverage.sh | 2 +- .../templates/aeolus/java/plain_maven.sh | 4 - .../templates/aeolus/ocaml/default.sh | 4 +- .../templates/aeolus/python/default.sh | 8 +- .../resources/templates/aeolus/swift/plain.sh | 56 +++++------ .../templates/aeolus/swift/plain_static.sh | 62 ++++++------- .../templates/aeolus/vhdl/default.sh | 38 ++++---- 16 files changed, 231 insertions(+), 239 deletions(-) diff --git a/src/main/resources/templates/aeolus/assembler/default.sh b/src/main/resources/templates/aeolus/assembler/default.sh index 1cfc7bf06e2f..d3dd8f871a4d 100644 --- a/src/main/resources/templates/aeolus/assembler/default.sh +++ b/src/main/resources/templates/aeolus/assembler/default.sh @@ -4,41 +4,41 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} provide_environment_information () { echo '⚙️ executing provide_environment_information' #!/bin/bash -echo "--------------------Python versions--------------------" -python3 --version -pip3 --version -echo "--------------------Contents of tests repository--------------------" -ls -la tests -echo "---------------------------------------------" -echo "--------------------Contents of assignment repository--------------------" -ls -la assignment -echo "---------------------------------------------" -#Fallback in case Docker does not work as intended -REQ_FILE=tests/requirements.txt -if [ -f "$REQ_FILE" ]; then - pip3 install --user -r tests/requirements.txt -else - echo "$REQ_FILE does not exist" -fi + echo "--------------------Python versions--------------------" + python3 --version + pip3 --version + echo "--------------------Contents of tests repository--------------------" + ls -la tests + echo "---------------------------------------------" + echo "--------------------Contents of assignment repository--------------------" + ls -la assignment + echo "---------------------------------------------" + #Fallback in case Docker does not work as intended + REQ_FILE=tests/requirements.txt + if [ -f "$REQ_FILE" ]; then + pip3 install --user -r tests/requirements.txt + else + echo "$REQ_FILE does not exist" + fi } prepare_makefile () { echo '⚙️ executing prepare_makefile' #!/usr/bin/env bash -rm -f assignment/{GNUmakefile, Makefile, makefile} -rm -f assignment/io.inc -cp -f tests/Makefile assignment/Makefile || exit 2 -cp -f tests/io.inc assignment/io.inc || exit 2 + rm -f assignment/{GNUmakefile, Makefile, makefile} + rm -f assignment/io.inc + cp -f tests/Makefile assignment/Makefile || exit 2 + cp -f tests/io.inc assignment/io.inc || exit 2 } run_and_compile () { echo '⚙️ executing run_and_compile' cd tests -python3 compileTest.py ../assignment/ -rm compileTest.py -cp result.xml ../assignment/result.xml + python3 compileTest.py ../assignment/ + rm compileTest.py + cp result.xml ../assignment/result.xml } diff --git a/src/main/resources/templates/aeolus/c/fact.sh b/src/main/resources/templates/aeolus/c/fact.sh index a06b940d97ba..7882ee1a825d 100644 --- a/src/main/resources/templates/aeolus/c/fact.sh +++ b/src/main/resources/templates/aeolus/c/fact.sh @@ -4,40 +4,40 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} setup_the_build_environment () { echo '⚙️ executing setup_the_build_environment' #!/usr/bin/env bash -# ------------------------------ -# Task Description: -# Build and run all tests -# ------------------------------ -# Updating assignment and test-reports ownership... -sudo chown artemis_user:artemis_user assignment/ -R || true -sudo rm -rf test-reports -sudo mkdir test-reports -sudo chown artemis_user:artemis_user test-reports/ -R || true + # ------------------------------ + # Task Description: + # Build and run all tests + # ------------------------------ + # Updating assignment and test-reports ownership... + sudo chown artemis_user:artemis_user assignment/ -R || true + sudo rm -rf test-reports + sudo mkdir test-reports + sudo chown artemis_user:artemis_user test-reports/ -R || true } build_and_run_all_tests () { echo '⚙️ executing build_and_run_all_tests' #!/usr/bin/env bash -# ------------------------------ -# Task Description: -# Build and run all tests -# ------------------------------ + # ------------------------------ + # Task Description: + # Build and run all tests + # ------------------------------ -rm -f assignment/GNUmakefile -rm -f assignment/Makefile -cp -f tests/Makefile assignment/Makefile || exit 2 -cd tests -python3 Tests.py -rm Tests.py -rm -rf ./tests || true + rm -f assignment/GNUmakefile + rm -f assignment/Makefile + cp -f tests/Makefile assignment/Makefile || exit 2 + cd tests + python3 Tests.py + rm Tests.py + rm -rf ./tests || true } cleanup () { echo '⚙️ executing cleanup' sudo rm -rf tests/ assignment/ test-reports/ || true -chmod -R 777 . + chmod -R 777 . } main () { diff --git a/src/main/resources/templates/aeolus/c/gcc.sh b/src/main/resources/templates/aeolus/c/gcc.sh index 04efb0105fbe..26a40ac220bc 100644 --- a/src/main/resources/templates/aeolus/c/gcc.sh +++ b/src/main/resources/templates/aeolus/c/gcc.sh @@ -5,26 +5,26 @@ setup_the_build_environment () { echo '⚙️ executing setup_the_build_environment' #!/usr/bin/env bash -# ------------------------------ -# Task Description: -# Build and run all tests -# ------------------------------ - -# Updating assignment and test-reports ownership... -sudo chown artemis_user:artemis_user assignment/ -R -sudo rm -rf test-reports -mkdir test-reports -chown artemis_user:artemis_user test-reports/ -R - -# assignment -cd tests -REQ_FILE=requirements.txt -if [ -f "$REQ_FILE" ]; then - pip3 install --user -r requirements.txt || true -else - echo "$REQ_FILE does not exist" -fi -cd .. + # ------------------------------ + # Task Description: + # Build and run all tests + # ------------------------------ + + # Updating assignment and test-reports ownership... + sudo chown artemis_user:artemis_user assignment/ -R + sudo rm -rf test-reports + mkdir test-reports + chown artemis_user:artemis_user test-reports/ -R + + # assignment + cd tests + REQ_FILE=requirements.txt + if [ -f "$REQ_FILE" ]; then + pip3 install --user -r requirements.txt || true + else + echo "$REQ_FILE does not exist" + fi + cd .. } @@ -32,47 +32,47 @@ setup_makefile () { echo '⚙️ executing setup_makefile' #!/usr/bin/env bash -# ------------------------------ -# Task Description: -# Setup makefile -# ------------------------------ + # ------------------------------ + # Task Description: + # Setup makefile + # ------------------------------ -shadowFilePath="../tests/testUtils/c/shadow_exec.c" + shadowFilePath="../tests/testUtils/c/shadow_exec.c" -foundIncludeDirs=`grep -m 1 'INCLUDEDIRS\s*=' assignment/Makefile` + foundIncludeDirs=`grep -m 1 'INCLUDEDIRS\s*=' assignment/Makefile` -foundSource=`grep -m 1 'SOURCE\s*=' assignment/Makefile` -foundSource="$foundSource $shadowFilePath" + foundSource=`grep -m 1 'SOURCE\s*=' assignment/Makefile` + foundSource="$foundSource $shadowFilePath" -rm -f assignment/GNUmakefile -rm -f assignment/makefile + rm -f assignment/GNUmakefile + rm -f assignment/makefile -cp -f tests/Makefile assignment/Makefile || exit 2 -sed -i "s~\bINCLUDEDIRS\s*=.*~${foundIncludeDirs}~; s~\bSOURCE\s*=.*~${foundSource}~" assignment/Makefile + cp -f tests/Makefile assignment/Makefile || exit 2 + sed -i "s~\bINCLUDEDIRS\s*=.*~${foundIncludeDirs}~; s~\bSOURCE\s*=.*~${foundSource}~" assignment/Makefile } build_and_run_all_tests () { echo '⚙️ executing build_and_run_all_tests' #!/usr/bin/env bash -# ------------------------------ -# Task Description: -# Build and run all tests if the compilation succeeds -# ------------------------------ -sudo chown artemis_user:artemis_user . -gcc -c -Wall assignment/*.c || error=true -if [ ! $error ] -then - cd tests || exit 0 - python3 Tests.py || true -fi + # ------------------------------ + # Task Description: + # Build and run all tests if the compilation succeeds + # ------------------------------ + sudo chown artemis_user:artemis_user . + gcc -c -Wall assignment/*.c || error=true + if [ ! $error ] + then + cd tests || exit 0 + python3 Tests.py || true + fi } cleanup () { echo '⚙️ executing cleanup' sudo rm -rf tests/ assignment/ test-reports/ || true -chmod -R 777 . + chmod -R 777 . } main () { diff --git a/src/main/resources/templates/aeolus/c/gcc_static.sh b/src/main/resources/templates/aeolus/c/gcc_static.sh index fbac369015c7..33fec5ac06f8 100644 --- a/src/main/resources/templates/aeolus/c/gcc_static.sh +++ b/src/main/resources/templates/aeolus/c/gcc_static.sh @@ -5,26 +5,26 @@ setup_the_build_environment () { echo '⚙️ executing setup_the_build_environment' #!/usr/bin/env bash -# ------------------------------ -# Task Description: -# Build and run all tests -# ------------------------------ - -# Updating assignment and test-reports ownership... -sudo chown artemis_user:artemis_user assignment/ -R -sudo rm -rf test-reports -mkdir test-reports -chown artemis_user:artemis_user test-reports/ -R - -# assignment -cd tests -REQ_FILE=requirements.txt -if [ -f "$REQ_FILE" ]; then - pip3 install --user -r requirements.txt || true -else - echo "$REQ_FILE does not exist" -fi -cd .. + # ------------------------------ + # Task Description: + # Build and run all tests + # ------------------------------ + + # Updating assignment and test-reports ownership... + sudo chown artemis_user:artemis_user assignment/ -R + sudo rm -rf test-reports + mkdir test-reports + chown artemis_user:artemis_user test-reports/ -R + + # assignment + cd tests + REQ_FILE=requirements.txt + if [ -f "$REQ_FILE" ]; then + pip3 install --user -r requirements.txt || true + else + echo "$REQ_FILE does not exist" + fi + cd .. } @@ -32,49 +32,49 @@ setup_makefile () { echo '⚙️ executing setup_makefile' #!/usr/bin/env bash -# ------------------------------ -# Task Description: -# Setup makefile -# ------------------------------ + # ------------------------------ + # Task Description: + # Setup makefile + # ------------------------------ -shadowFilePath="../tests/testUtils/c/shadow_exec.c" + shadowFilePath="../tests/testUtils/c/shadow_exec.c" -foundIncludeDirs=`grep -m 1 'INCLUDEDIRS\s*=' assignment/Makefile` + foundIncludeDirs=`grep -m 1 'INCLUDEDIRS\s*=' assignment/Makefile` -foundSource=`grep -m 1 'SOURCE\s*=' assignment/Makefile` -foundSource="$foundSource $shadowFilePath" + foundSource=`grep -m 1 'SOURCE\s*=' assignment/Makefile` + foundSource="$foundSource $shadowFilePath" -rm -f assignment/GNUmakefile -rm -f assignment/makefile + rm -f assignment/GNUmakefile + rm -f assignment/makefile -cp -f tests/Makefile assignment/Makefile || exit 2 -sed -i "s~\bINCLUDEDIRS\s*=.*~${foundIncludeDirs}~; s~\bSOURCE\s*=.*~${foundSource}~" assignment/Makefile + cp -f tests/Makefile assignment/Makefile || exit 2 + sed -i "s~\bINCLUDEDIRS\s*=.*~${foundIncludeDirs}~; s~\bSOURCE\s*=.*~${foundSource}~" assignment/Makefile } build_and_run_all_tests () { echo '⚙️ executing build_and_run_all_tests' #!/usr/bin/env bash -# ------------------------------ -# Task Description: -# Build and run all tests if the compilation succeeds -# ------------------------------ -sudo chown artemis_user:artemis_user . -gcc -c -Wall assignment/*.c || error=true -if [ ! $error ] -then - cd tests || exit 0 - python3 Tests.py || true -else - exit 1 -fi + # ------------------------------ + # Task Description: + # Build and run all tests if the compilation succeeds + # ------------------------------ + sudo chown artemis_user:artemis_user . + gcc -c -Wall assignment/*.c || error=true + if [ ! $error ] + then + cd tests || exit 0 + python3 Tests.py || true + else + exit 1 + fi } cleanup () { echo '⚙️ executing cleanup' sudo rm -rf tests/ assignment/ test-reports/ || true -chmod -R 777 . + chmod -R 777 . } main () { diff --git a/src/main/resources/templates/aeolus/haskell/default.sh b/src/main/resources/templates/aeolus/haskell/default.sh index 7a437b00acd9..5b2987f8df88 100644 --- a/src/main/resources/templates/aeolus/haskell/default.sh +++ b/src/main/resources/templates/aeolus/haskell/default.sh @@ -4,9 +4,9 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} build_and_test_the_code () { echo '⚙️ executing build_and_test_the_code' # the build process is specified in `run.sh` in the test repository -# -s enables the safe testing mode -chmod +x run.sh -./run.sh -s + # -s enables the safe testing mode + chmod +x run.sh + ./run.sh -s } diff --git a/src/main/resources/templates/aeolus/haskell/default_sequential.sh b/src/main/resources/templates/aeolus/haskell/default_sequential.sh index 95015e0e9049..f714fd7bea2b 100644 --- a/src/main/resources/templates/aeolus/haskell/default_sequential.sh +++ b/src/main/resources/templates/aeolus/haskell/default_sequential.sh @@ -4,18 +4,18 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} run_structural_tests () { echo '⚙️ executing run_structural_tests' # the build process is specified in `run.sh` in the test repository -# -s enables the safe testing mode -chmod +x run.sh -./run.sh -s + # -s enables the safe testing mode + chmod +x run.sh + ./run.sh -s } run_behavior_tests () { echo '⚙️ executing run_behavior_tests' # the build process is specified in `run.sh` in the test repository -# -s enables the safe testing mode -chmod +x run.sh -./run.sh -s + # -s enables the safe testing mode + chmod +x run.sh + ./run.sh -s } diff --git a/src/main/resources/templates/aeolus/java/plain_gradle.sh b/src/main/resources/templates/aeolus/java/plain_gradle.sh index f150e9226ff5..0a0216ced38c 100644 --- a/src/main/resources/templates/aeolus/java/plain_gradle.sh +++ b/src/main/resources/templates/aeolus/java/plain_gradle.sh @@ -4,7 +4,7 @@ set -e gradle () { echo '⚙️ executing gradle' chmod +x ./gradlew -./gradlew clean test + ./gradlew clean test } @@ -14,10 +14,6 @@ setup_working_directory_for_cleanup () { } main () { - if [[ "${1}" == "aeolus_sourcing" ]]; then - return 0 # just source to use the methods in the subshell, no execution - fi - cd "${AEOLUS_INITIAL_DIRECTORY}" gradle } diff --git a/src/main/resources/templates/aeolus/java/plain_gradle_sequential.sh b/src/main/resources/templates/aeolus/java/plain_gradle_sequential.sh index 00dbf2167e79..a9f199f666e7 100644 --- a/src/main/resources/templates/aeolus/java/plain_gradle_sequential.sh +++ b/src/main/resources/templates/aeolus/java/plain_gradle_sequential.sh @@ -4,7 +4,7 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} structural_tests () { echo '⚙️ executing structural_tests' chmod +x ./gradlew -./gradlew clean structuralTests + ./gradlew clean structuralTests } diff --git a/src/main/resources/templates/aeolus/java/plain_gradle_static.sh b/src/main/resources/templates/aeolus/java/plain_gradle_static.sh index 40a7187b9ab7..3ccf3a00373c 100644 --- a/src/main/resources/templates/aeolus/java/plain_gradle_static.sh +++ b/src/main/resources/templates/aeolus/java/plain_gradle_static.sh @@ -4,7 +4,7 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} gradle () { echo '⚙️ executing gradle' chmod +x ./gradlew -./gradlew clean test + ./gradlew clean test } diff --git a/src/main/resources/templates/aeolus/java/plain_gradle_static_coverage.sh b/src/main/resources/templates/aeolus/java/plain_gradle_static_coverage.sh index a2c4c2269dd1..bae013adbd6f 100644 --- a/src/main/resources/templates/aeolus/java/plain_gradle_static_coverage.sh +++ b/src/main/resources/templates/aeolus/java/plain_gradle_static_coverage.sh @@ -4,7 +4,7 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} tests () { echo '⚙️ executing tests' chmod +x ./gradlew -./gradlew clean test tiaTests --run-all-tests + ./gradlew clean test tiaTests --run-all-tests } diff --git a/src/main/resources/templates/aeolus/java/plain_maven.sh b/src/main/resources/templates/aeolus/java/plain_maven.sh index 8ecd4fd40ad5..413a0014003d 100644 --- a/src/main/resources/templates/aeolus/java/plain_maven.sh +++ b/src/main/resources/templates/aeolus/java/plain_maven.sh @@ -7,10 +7,6 @@ maven () { } main () { - if [[ "${1}" == "aeolus_sourcing" ]]; then - return 0 # just source to use the methods in the subshell, no execution - fi - cd "${AEOLUS_INITIAL_DIRECTORY}" maven } diff --git a/src/main/resources/templates/aeolus/ocaml/default.sh b/src/main/resources/templates/aeolus/ocaml/default.sh index d4b420cb8cfd..da8e86d8fe39 100644 --- a/src/main/resources/templates/aeolus/ocaml/default.sh +++ b/src/main/resources/templates/aeolus/ocaml/default.sh @@ -5,8 +5,8 @@ build_and_test_the_code () { echo '⚙️ executing build_and_test_the_code' cd "tests" # the build process is specified in `run.sh` in the test repository -chmod +x run.sh -./run.sh -s + chmod +x run.sh + ./run.sh -s } diff --git a/src/main/resources/templates/aeolus/python/default.sh b/src/main/resources/templates/aeolus/python/default.sh index 9592699ffd6e..21c25e172103 100644 --- a/src/main/resources/templates/aeolus/python/default.sh +++ b/src/main/resources/templates/aeolus/python/default.sh @@ -4,10 +4,10 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} build_and_test_the_code () { echo '⚙️ executing build_and_test_the_code' python3 -m compileall . -q || error=true -if [ ! $error ] -then - pytest --junitxml=test-reports/results.xml -fi + if [ ! $error ] + then + pytest --junitxml=test-reports/results.xml + fi } junit () { diff --git a/src/main/resources/templates/aeolus/swift/plain.sh b/src/main/resources/templates/aeolus/swift/plain.sh index cfb6964f8ac2..7b641c959280 100644 --- a/src/main/resources/templates/aeolus/swift/plain.sh +++ b/src/main/resources/templates/aeolus/swift/plain.sh @@ -4,34 +4,34 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} build_and_test_the_code () { echo '⚙️ executing build_and_test_the_code' # Delete possible old Sources and replace with student's assignment Sources -rm -rf Sources -mv assignment/Sources . -# Delete and create the assignment directory from scratch -mv assignment/.git/refs/heads assignment_git_heads # localci workaround -rm -rf assignment -mkdir assignment -mkdir -p assignment/.git/refs # localci workaround -mv assignment_git_heads/ assignment/.git/refs/heads/ # localci workaround -cp -R Sources assignment -# copy test files -cp -R Tests assignment -cp Package.swift assignment - -# In order to get the correct console output we need to execute the command within the assignment directory -# swift build -cd assignment -swift build || error=true - -if [ ! $error ] -then - # swift test - swift test || true -fi - -# The used docker container is calling 'swift build' which creates files as root (e.g. tests.xml), -# so we need to allow everyone to access these files -cd .. -chmod -R 777 . + rm -rf Sources + mv assignment/Sources . + # Delete and create the assignment directory from scratch + mv assignment/.git/refs/heads assignment_git_heads # localci workaround + rm -rf assignment + mkdir assignment + mkdir -p assignment/.git/refs # localci workaround + mv assignment_git_heads/ assignment/.git/refs/heads/ # localci workaround + cp -R Sources assignment + # copy test files + cp -R Tests assignment + cp Package.swift assignment + + # In order to get the correct console output we need to execute the command within the assignment directory + # swift build + cd assignment + swift build || error=true + + if [ ! $error ] + then + # swift test + swift test || true + fi + + # The used docker container is calling 'swift build' which creates files as root (e.g. tests.xml), + # so we need to allow everyone to access these files + cd .. + chmod -R 777 . } diff --git a/src/main/resources/templates/aeolus/swift/plain_static.sh b/src/main/resources/templates/aeolus/swift/plain_static.sh index 0d277f322f10..7c8e4e8eb9b5 100644 --- a/src/main/resources/templates/aeolus/swift/plain_static.sh +++ b/src/main/resources/templates/aeolus/swift/plain_static.sh @@ -4,46 +4,46 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} build_and_test_the_code () { echo '⚙️ executing build_and_test_the_code' # Delete possible old Sources and replace with student's assignment Sources -rm -rf Sources -mv assignment/Sources . -# Delete and create the assignment directory from scratch -mv assignment/.git/refs/heads assignment_git_heads # localci workaround -rm -rf assignment -mkdir assignment -mkdir -p assignment/.git/refs # localci workaround -mv assignment_git_heads/ assignment/.git/refs/heads/ # localci workaround -cp -R Sources assignment -# copy test files -cp -R Tests assignment -cp Package.swift assignment + rm -rf Sources + mv assignment/Sources . + # Delete and create the assignment directory from scratch + mv assignment/.git/refs/heads assignment_git_heads # localci workaround + rm -rf assignment + mkdir assignment + mkdir -p assignment/.git/refs # localci workaround + mv assignment_git_heads/ assignment/.git/refs/heads/ # localci workaround + cp -R Sources assignment + # copy test files + cp -R Tests assignment + cp Package.swift assignment -# In order to get the correct console output we need to execute the command within the assignment directory -# swift build -cd assignment -swift build || error=true + # In order to get the correct console output we need to execute the command within the assignment directory + # swift build + cd assignment + swift build || error=true -if [ ! $error ] -then - # swift test - swift test || true -fi + if [ ! $error ] + then + # swift test + swift test || true + fi -# The used docker container is calling 'swift build' which creates files as root (e.g. tests.xml), -# so we need to allow everyone to access these files -cd .. -chmod -R 777 . + # The used docker container is calling 'swift build' which creates files as root (e.g. tests.xml), + # so we need to allow everyone to access these files + cd .. + chmod -R 777 . } run_static_code_analysis () { echo '⚙️ executing run_static_code_analysis' # Copy SwiftLint rules -cp .swiftlint.yml assignment || true -# create target directory for SCA Parser -mkdir target -cd assignment -# Execute static code analysis -swiftlint > ../target/swiftlint-result.xml + cp .swiftlint.yml assignment || true + # create target directory for SCA Parser + mkdir target + cd assignment + # Execute static code analysis + swiftlint > ../target/swiftlint-result.xml } diff --git a/src/main/resources/templates/aeolus/vhdl/default.sh b/src/main/resources/templates/aeolus/vhdl/default.sh index 328a7f79ab42..2ac98ecad059 100644 --- a/src/main/resources/templates/aeolus/vhdl/default.sh +++ b/src/main/resources/templates/aeolus/vhdl/default.sh @@ -4,31 +4,31 @@ export AEOLUS_INITIAL_DIRECTORY=${PWD} provide_environment_information () { echo '⚙️ executing provide_environment_information' #!/bin/bash -echo "--------------------Python versions--------------------" -python3 --version -pip3 --version + echo "--------------------Python versions--------------------" + python3 --version + pip3 --version -echo "--------------------Contents of tests repository--------------------" -ls -la tests -echo "---------------------------------------------" -echo "--------------------Contents of assignment repository--------------------" -ls -la assignment -echo "---------------------------------------------" + echo "--------------------Contents of tests repository--------------------" + ls -la tests + echo "---------------------------------------------" + echo "--------------------Contents of assignment repository--------------------" + ls -la assignment + echo "---------------------------------------------" -#Fallback in case Docker does not work as intended -REQ_FILE=tests/requirements.txt -if [ -f "$REQ_FILE" ]; then - pip3 install --user -r tests/requirements.txt || true -else - echo "$REQ_FILE does not exist" -fi + #Fallback in case Docker does not work as intended + REQ_FILE=tests/requirements.txt + if [ -f "$REQ_FILE" ]; then + pip3 install --user -r tests/requirements.txt || true + else + echo "$REQ_FILE does not exist" + fi } prepare_makefile () { echo '⚙️ executing prepare_makefile' rm -f assignment/{GNUmakefile, Makefile, makefile} -cp -f tests/Makefile assignment/Makefile || exit 2 + cp -f tests/Makefile assignment/Makefile || exit 2 } @@ -36,8 +36,8 @@ run_and_compile () { echo '⚙️ executing run_and_compile' cd "tests" python3 compileTest.py ../assignment/ -rm compileTest.py -cp result.xml ../assignment/result.xml + rm compileTest.py + cp result.xml ../assignment/result.xml }