From eb69754dec48ab202750a96160fd07851ce516a8 Mon Sep 17 00:00:00 2001
From: Andrew Tridgell <andrew@tridgell.net>
Date: Mon, 14 Feb 2022 15:35:58 +1100
Subject: [PATCH] run generator from repo, avoiding CI issues

---
 generator/C/test/posix/Makefile |  2 +-
 test_generator.sh               | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/generator/C/test/posix/Makefile b/generator/C/test/posix/Makefile
index 8e51c807..2ff2081e 100644
--- a/generator/C/test/posix/Makefile
+++ b/generator/C/test/posix/Makefile
@@ -2,7 +2,7 @@
 # errors in the generator, but without it, we can't run the tests to completion. 
 # particular issues are with pointers to arrays right now. TODO - fix the generator and remove this.
 CFLAGS = -g -Wall -Werror -O0 -Wno-address-of-packed-member
-TESTPROTOCOL = common
+TESTPROTOCOL = ardupilotmega
 ALLPROTOCOLS = minimal test common pixhawk ardupilotmega slugs ualberta
 
 all: 
diff --git a/test_generator.sh b/test_generator.sh
index 7a9472ca..68565bc4 100755
--- a/test_generator.sh
+++ b/test_generator.sh
@@ -13,16 +13,14 @@ test -z "$MDEF" && MDEF="../message_definitions"
 
 # MAVLINK_DIALECT=ardupilotmega python setup.py clean build install --user
 
-mavgen.py --lang C $MDEF/v1.0/ardupilotmega.xml -o generator/C/include_v1.0 --wire-protocol=1.0
-mavgen.py --lang C $MDEF/v1.0/ardupilotmega.xml -o generator/C/include_v2.0 --wire-protocol=2.0
-
-mavgen.py --lang C++11 $MDEF/v1.0/ardupilotmega.xml -o generator/CPP11/include_v2.0 --wire-protocol=2.0
+tools/mavgen.py --lang C $MDEF/v1.0/all.xml -o generator/C/include_v1.0 --wire-protocol=1.0
+tools/mavgen.py --lang C $MDEF/v1.0/all.xml -o generator/C/include_v2.0 --wire-protocol=2.0
+tools/mavgen.py --lang C++11 $MDEF/v1.0/all.xml -o generator/CPP11/include_v2.0 --wire-protocol=2.0
 
 pushd generator/C/test/posix
-make clean testmav1.0_common testmav2.0_common testmav1.0_ardupilotmega testmav2.0_ardupilotmega testmav2.0_minimal
+make clean testmav1.0_ardupilotmega testmav2.0_ardupilotmega
+
 # these test tools emit the test packet as hexadecimal and human-readable, other tools consume it as a cross-reference, we ignore the hex here.
-./testmav1.0_common | egrep -v '(^fe|^fd)'
-./testmav2.0_common | egrep -v '(^fe|^fd)'
 ./testmav1.0_ardupilotmega | egrep -v '(^fe|^fd)'
 ./testmav2.0_ardupilotmega | egrep -v '(^fe|^fd)'
 popd
-- 
GitLab