Решение систем нелинейных уравнений https://www.mapleprimes.com/users/one%20man/posts?page=1
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

check.sh 697B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. let PASS=0
  3. let FAIL=0
  4. TEST_NAME="./Draghilev -o out.txt"
  5. if [ "$mathgl" == "y" ]; then
  6. TEST_NAME="./Draghilev -m -o out.txt"
  7. elif [ "$oct" == "y" ]; then
  8. TEST_NAME="./Draghilev -O draghilev.m -o out.txt; octave -q draghilev.m"
  9. else
  10. TEST_NAME="./Draghilev -o out.txt"
  11. fi
  12. for i in {1..9}
  13. do
  14. rm example.txt
  15. ln -s ./test/Drag_example_$i example.txt
  16. eval $TEST_NAME
  17. diff -q out.txt ./test/Drag_example_tab_$i 1>/dev/null
  18. if [ $? = "0" ]
  19. then
  20. let PASS++
  21. elif [ $? = "1" ]
  22. then
  23. fail_num[$FAIL]=$i
  24. let FAIL++
  25. fi
  26. done
  27. echo "PASS $PASS"
  28. echo "FAIL $FAIL"
  29. if [ $FAIL -gt 0 ]
  30. then
  31. echo "тест ${fail_num[*]} не пройден"
  32. fi