Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2e63e3e

Browse files
committed
debugging in ci tool checks
1 parent 78380e8 commit 2e63e3e

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

‎tests/test_mkbuildoptglobals.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ function step_summary()
1111
echo ""
1212
}
1313

14+
# mkbuildoptglobals.py always in debug mode
15+
export ESP8266_ARDUINO_MKBUILDOPTGLOBALS_DEBUG="y"
16+
17+
# https://arduino.github.io/arduino-cli/1.2/configuration
1418
export ARDUINO_BUILD_CACHE_PATH="$cache_dir"
1519

1620
esp8266_dir="${ESP8266_ARDUINO_BUILD_DIR}"

‎tools/mkbuildoptglobals.py‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@
5757
)
5858

5959

60+
# Some command line flags can be set through environment
61+
def environment_setting(name: str, default: Optional[str]) -> str:
62+
return os.environ.get(f"ESP8266_ARDUINO_MKBUILDOPTGLOBALS_{name}", default or "")
63+
64+
65+
def is_true(v: str) -> bool:
66+
return v.lower() in ("y", "yes", "1", "true", "on")
67+
68+
69+
DEFAULT_DEBUG = is_true(environment_setting("DEBUG", "n"))
70+
DEFAULT_AUDIT = is_true(environment_setting("AUDIT", "n"))
71+
6072
# Like existing documentation methods, signature is embedded in the comment block
6173
# Unlike existing documentation methods, only the first line contains any metadata
6274

@@ -618,10 +630,16 @@ def main_help(args: argparse.Namespace):
618630
parser.set_defaults(func=main_help)
619631

620632
parser.add_argument(
621-
"--debug", action="store_true", help=argparse.SUPPRESS
633+
"--debug",
634+
action="store_true",
635+
help=argparse.SUPPRESS,
636+
default=DEFAULT_DEBUG,
622637
) # normal debug
623638
parser.add_argument(
624-
"--audit", action="store_true", help=argparse.SUPPRESS
639+
"--audit",
640+
action="store_true",
641+
help=argparse.SUPPRESS,
642+
default=DEFAULT_AUDIT,
625643
) # extra noisy debug
626644

627645
parser.add_argument(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /