diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a0d26d --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +build/ +build_debug +build_arm/ +build_arm_debug/ +archive/ +*~ \ No newline at end of file diff --git a/simulation_c1.txt b/simulations/simulation_c1.txt similarity index 100% rename from simulation_c1.txt rename to simulations/simulation_c1.txt diff --git a/simulation_shell.txt b/simulations/simulation_shell.txt similarity index 100% rename from simulation_shell.txt rename to simulations/simulation_shell.txt diff --git a/simulation_t1.txt b/simulations/simulation_t1.txt similarity index 100% rename from simulation_t1.txt rename to simulations/simulation_t1.txt diff --git a/test.sh b/test.sh index e380557..1747848 100755 --- a/test.sh +++ b/test.sh @@ -8,8 +8,8 @@ if [ "$?" = "0" ]; then echo Internal test OK fi -cat simulation_c1.txt | grep '^{' > test_expected.txt -$PROG --robot=json simulation_c1.txt \ +cat simulations/simulation_c1.txt | grep '^{' > test_expected.txt +$PROG --robot=json simulations/simulation_c1.txt \ MyHeater multical302 12345678 "" \ MyTapWater multical21 76348799 "" \ Vadden multical21 44556677 "" \ @@ -27,8 +27,8 @@ else Failure. fi -cat simulation_t1.txt | grep '^{' > test_expected.txt -$PROG --robot=json simulation_t1.txt \ +cat simulations/simulation_t1.txt | grep '^{' > test_expected.txt +$PROG --robot=json simulations/simulation_t1.txt \ MyWarmWater supercom587 12345678 "" \ MyColdWater supercom587 11111111 "" \ MoreWater iperl 12345699 "" \ @@ -45,7 +45,7 @@ else Failure. fi -$PROG --shell='echo "$METER_JSON"' simulation_shell.txt MWW supercom587 12345678 "" > test_output.txt +$PROG --shell='echo "$METER_JSON"' simulations/simulation_shell.txt MWW supercom587 12345678 "" > test_output.txt if [ "$?" == "0" ] then cat test_output.txt | sed 's/"timestamp":"....-..-..T..:..:..Z"/"timestamp":"1111-11-11T11:11:11Z"/' > test_responses.txt @@ -60,8 +60,8 @@ else fi rm -f /tmp/MyTapWater -cat simulation_c1.txt | grep '^{' | grep 76348799 | tail -n 1 > test_expected.txt -$PROG --meterfiles --robot=json simulation_c1.txt MyTapWater multical21 76348799 "" +cat simulations/simulation_c1.txt | grep '^{' | grep 76348799 | tail -n 1 > test_expected.txt +$PROG --meterfiles --robot=json simulations/simulation_c1.txt MyTapWater multical21 76348799 "" cat /tmp/MyTapWater | sed 's/"timestamp":"....-..-..T..:..:..Z"/"timestamp":"1111-11-11T11:11:11Z"/' > test_response.txt diff test_expected.txt test_response.txt if [ "$?" == "0" ] @@ -72,8 +72,8 @@ fi rm -rf /tmp/testmeters mkdir /tmp/testmeters -cat simulation_c1.txt | grep '^{' | grep 76348799 | tail -n 1 > test_expected.txt -$PROG --meterfiles=/tmp/testmeters --robot=json simulation_c1.txt MyTapWater multical21 76348799 "" +cat simulations/simulation_c1.txt | grep '^{' | grep 76348799 | tail -n 1 > test_expected.txt +$PROG --meterfiles=/tmp/testmeters --robot=json simulations/simulation_c1.txt MyTapWater multical21 76348799 "" cat /tmp/testmeters/MyTapWater | sed 's/"timestamp":"....-..-..T..:..:..Z"/"timestamp":"1111-11-11T11:11:11Z"/' > test_response.txt diff test_expected.txt test_response.txt if [ "$?" == "0" ]