From ad78565b2d2aa4886d790f9f4f02ad68c19d93c2 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed, 15 Jun 2022 20:02:32 +1200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20CI=20test=20without=20src=20filt?= =?UTF-8?q?er=20(emulate=20Arduino)=20(#24335)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/bin/ci_src_filter | 14 ++++++++++++++ buildroot/tests/mega2560 | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100755 buildroot/bin/ci_src_filter diff --git a/buildroot/bin/ci_src_filter b/buildroot/bin/ci_src_filter new file mode 100755 index 000000000000..928f492e69fa --- /dev/null +++ b/buildroot/bin/ci_src_filter @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# exit on first failure +set -e + +SED=$(which gsed sed | head -n1) +FN="platformio.ini" + +if [[ $1 == "-n" ]]; then + "${SED}" -i "s/default_src_filter/org_src_filter/" $FN + "${SED}" -i "/org_src_filter/ s/^/default_src_filter = +\n/" $FN +else + git checkout $FN 2>/dev/null +fi diff --git a/buildroot/tests/mega2560 b/buildroot/tests/mega2560 index fc24cf212509..6871ce4a0cef 100755 --- a/buildroot/tests/mega2560 +++ b/buildroot/tests/mega2560 @@ -12,6 +12,14 @@ set -e #restore_configs #exec_test $1 $2 "Default Configuration" "$3" +# +# Build with no source filers +# +restore_configs +ci_src_filter -n +exec_test $1 $2 "Default Configuration | no source filtering" "$3" +ci_src_filter -y + # # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders #