-
Notifications
You must be signed in to change notification settings - Fork 6
/
run_tests.sh
executable file
·49 lines (43 loc) · 1.21 KB
/
run_tests.sh
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
#!/bin/bash
# solver tests
# get data
mkfifo ./scheduler/juliaStdin
mkfifo ./scheduler/juliaStdout
julia ./scheduler/rpsMultiHostSolver.jl &
cp -a ./tests/solver/data/. ./scheduler/data/
cp -a ./tests/logCollector/. ./log-parser/get-workflow-logs/data/
cp ./tests/solver/rps_cost_test.py ./scheduler
cp ./tests/solver/rps_latency_test.py ./scheduler
cd ./scheduler
if command -v python &> /dev/null
then
python rps_cost_test.py
python rps_latency_test.py
elif command -v python3 &> /dev/null
then
python3 rps_cost_test.py
python3 rps_latency_test.py
fi
rm rps_cost_test.py
rm rps_latency_test.py
cd ./data
arr=("TestCase10Workflow" "TestCase11Workflow" "TestCase2Workflow" "TestCase3Workflow" "TestCase4Workflow" "TestCaseWorkflow" "TestCaseNWorkflow")
for item in "${arr[@]}"
do
rm -rf "$item"
done
cd ../../
cd ./log-parser/get-workflow-logs/data
for item in "${arr[@]}"
do
rm -rf "$item"
done
cd ../../../
# host agent tests
cp ./tests/host_agents/predictor_test.cpp host-agents/monitoring-agent/
cd host-agents/monitoring-agent
g++ -std=c++14 -I . predictor_test.cpp -o predictor_test
./predictor_test
rm ./predictor_test*
cd ../../
trap "echo -n \"END\" > ./scheduler/juliaStdin;" INT SIGINT SIGTERM EXIT