Commit c39e8568 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Complete test case with MSC both failing and succeeding

parent ee4a271f
mscdocument Untitled_Document /* MSC AND */;
msg Cabin_Command : (Cabin-button);
msg Floor_Command : (Floor-button);
msg Manual_Control : (Lift-control);
msg Start_Controller : (Start-condition);
msg Housekeeping : (Status);
/* CIF MSCDOCUMENT (0, 0) (1585, 1119) */
mscdocument Untitled_Leaf /* MSC LEAF */;
msc Untitled_MSC;
instance user;
out Start_Controller(nb-of-cycle: 1) to TASTE_System;
in Housekeeping({lift {door-open TRUE, door-closed TRUE, floor-detected FALSE, pos-x 69.999632125}, door door-close}) from TASTE_System;
endinstance;
instance TASTE_System;
in Start_Controller(nb-of-cycle: 1) from user;
out Housekeeping({lift {door-open TRUE, door-closed TRUE, floor-detected FALSE, pos-x 69.999632125}, door door-close}) to user;
endinstance;
endmsc;
endmscdocument;
endmscdocument;
...@@ -13,7 +13,8 @@ c: test-parse-c # Polyorb_HI_C output ...@@ -13,7 +13,8 @@ c: test-parse-c # Polyorb_HI_C output
cp lift_model/* work/lift_model/SIMULINK/src cp lift_model/* work/lift_model/SIMULINK/src
make -C work make -C work
# Test the MSC converter tool and execute the MSC scenario # Test the MSC converter tool and execute the MSC scenario
./regression.sh ./regression_ok.sh
./regression_nok.sh
test-parse-c: clean-c test-parse-c: clean-c
$(KAZOO) -p --gw \ $(KAZOO) -p --gw \
......
#!/bin/bash
cp MSC_ErrorCase.msc work/binaries/user_GUI
cd work/binaries/user_GUI
taste-msc2py MSC_ErrorCase.msc
../demo &
PID=$!
echo $PID
python3 ./MSC_ErrorCase.py
RET=$?
kill $PID || exit 1
if [ "$RET" != "0" ]
then
echo TEST CASE FAILED AS EXPECTED
exit 0
else
echo TEST CASE SUCCEEDED BUT THIS IS NOT EXPECTED
exit 1
fi
...@@ -5,5 +5,14 @@ taste-msc2py MSC_TestCase.msc ...@@ -5,5 +5,14 @@ taste-msc2py MSC_TestCase.msc
../demo & ../demo &
PID=$! PID=$!
echo $PID echo $PID
python3 ./MSC_TestCase.py || (kill $PID && echo 'TEST CASE FAILED' && exit 1 || echo 'FAILED killing demo') python3 ./MSC_TestCase.py
kill $PID RET=$?
kill $PID || exit 1
if [ "$RET" != "0" ]
then
echo TEST CASE FAILED
exit 1
else
echo TEST CASE SUCCESS
exit 0
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment