Logo white

Peter M. Groen / libmodbus

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • libmodbus
  • tests
  • unit-tests.sh
  • Run unit tests with standard: make check (closes #205, closes #238) ...
    3f96e18c
    This patch has been developed by Andrey Skvortsov, Michael Heimpold
    and Stéphane Raimbault.
    
    - avoid bash'isms and use of GNU find
    - terminate server after test run (ignored in TCP mode)
    - add *.log, *.trs to .gitignore
    - unit-test-client returns 0 on success
    - save exit code of unit-test-client for make check status
    - replace kill by killall
    - add entry in README
    Andrey Skvortsov authored
    2015-02-18 17:24:54 +0100  
    Browse Code »
unit-tests.sh 274 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh

client_log=unit-test-client.log
server_log=unit-test-server.log

rm -f $client_log $server_log

echo "Starting server"
./unit-test-server > $server_log 2>&1 &

echo "Starting client"
./unit-test-client > $client_log 2>&1
rc=$?

killall unit-test-server
exit $rc