diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01c7dc07e98f7c9379c30d174e763dc2e850ac95..c6b186b092255511301ba4fcf62f9e72ac950089 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,7 @@ variables: CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest DOCKER_HOST: tcp://docker:2375 DOCKER_TLS_CERTDIR: "" + ASSIGNMENT: 0-list build: @@ -28,4 +29,4 @@ checker: image: name: gitlab.cs.pub.ro:5050/so2/0-list script: - - echo "" + - ./checker/checker.sh $ASSIGNMENT diff --git a/checker/checker.sh b/checker/checker.sh index a3a809760c4464fa390eb2365560ff4e7436cad1..e0da7907d0472bb297fa122002c7d465b8cadf9f 100755 --- a/checker/checker.sh +++ b/checker/checker.sh @@ -32,10 +32,16 @@ run_checker() local module_path="${assignment_dir}/${assignment_mod}" + echo "Copying the contents of src/ into $assignment_dir" + cp src/* $assignment_dir + + echo "Checking if $assignment_mod exists before build" + if [ -f $module_path ]; then + echo "$assignment_mod shouldn't exists. Removing ${module_path}" + rm $module_path + fi + pushd /linux/tools/labs - if [ -f $module_path ]; then - echo "Removing ${module_path}" - fi if [ -f $output ]; then echo "Removing $output" rm $output &> /dev/null