test_generator.sh 931 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # This requires the python future library
  3. # On MS windows, cygwin usually does not provide that.
  4. # The workaround is then to issue on a cygwin prompt:
  5. # easy_install-2.7 pip
  6. # pip install future
  7. set -e
  8. set -x
  9. test -z "$MDEF" && MDEF="../message_definitions"
  10. # MAVLINK_DIALECT=ardupilotmega python setup.py clean build install --user
  11. mavgen.py --lang C $MDEF/v1.0/ardupilotmega.xml -o generator/C/include_v1.0 --wire-protocol=1.0
  12. mavgen.py --lang C $MDEF/v1.0/ardupilotmega.xml -o generator/C/include_v2.0 --wire-protocol=2.0
  13. mavgen.py --lang C++11 $MDEF/v1.0/ardupilotmega.xml -o generator/CPP11/include_v2.0 --wire-protocol=2.0
  14. pushd generator/C/test/posix
  15. make clean testmav1.0_common testmav2.0_common testmav1.0_ardupilotmega testmav2.0_ardupilotmega
  16. ./testmav1.0_common
  17. ./testmav2.0_common
  18. ./testmav1.0_ardupilotmega
  19. ./testmav2.0_ardupilotmega
  20. popd
  21. pushd generator/CPP11/test/posix
  22. make clean all
  23. popd