github.com/criteo/command-launcher@v0.0.0-20230407142452-fb616f546e98/test/integration/test-template.sh (about) 1 #!/bin/bash 2 3 # availeble environment varibale 4 # CL_PATH: the path of the command launcher binary 5 # CL_HOME: the path of the command launcher home directory 6 # OUTPUT_DIR: the output folder 7 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 8 9 # clean up the dropin folder 10 rm -rf $CL_HOME/dropins 11 mkdir -p $CL_HOME/dropins 12 13 # copy the example to the dropin folder for the test 14 cp -R $SCRIPT_DIR/../packages-src/bonjour $CL_HOME/dropins 15 16 # run command launcher 17 echo "> integration test - template" 18 RESULT=$($CL_PATH bonjour) 19 20 # check result or exit code, or any thing relevant to the test 21 if [ $? -eq 0 ]; then 22 echo "OK" 23 else 24 echo "KO - should return 0 when command succeeds" 25 exit 1 26 fi 27 28 29 30 31