@@ -395,7 +395,7 @@ def main() -> None:
395395 shell = bool (int (os .getenv ('TEST_SHELL' , '0' )))
396396 summary = Summary .get (args )
397397
398- if shell and not sys .stderr .isatty ():
398+ if shell and not sys .stdin .isatty ():
399399 print (
400400 '--interactive must be passed to meson test to use TEST_SHELL=1' ,
401401 file = sys .stderr ,
@@ -443,7 +443,7 @@ def main() -> None:
443443
444444 journal_file .unlink (missing_ok = True )
445445
446- if not sys .stderr .isatty ():
446+ if not sys .stdin .isatty ():
447447 dropin += textwrap .dedent (
448448 """
449449 [Unit]
@@ -458,7 +458,7 @@ def main() -> None:
458458 """
459459 )
460460
461- if sys .stderr .isatty ():
461+ if sys .stdin .isatty ():
462462 dropin += textwrap .dedent (
463463 """
464464 [Service]
@@ -489,7 +489,7 @@ def main() -> None:
489489 '--credential' , f'systemd.extra-unit.emergency-exit.service={ shlex .quote (EMERGENCY_EXIT_SERVICE )} ' , # noqa: E501
490490 '--credential' , f'systemd.unit-dropin.emergency.target={ shlex .quote (EMERGENCY_EXIT_DROPIN )} ' ,
491491 ]
492- if not sys .stderr .isatty ()
492+ if not sys .stdin .isatty ()
493493 else []
494494 ),
495495 '--credential' , f'systemd.unit-dropin.{ args .unit } ={ shlex .quote (dropin )} ' ,
@@ -514,13 +514,13 @@ def main() -> None:
514514 'systemd.crash_action=poweroff' ,
515515 'loglevel=6' ,
516516 ]
517- if not sys .stderr .isatty ()
517+ if not sys .stdin .isatty ()
518518 else []
519519 ),
520520 ]
521521 ),
522- '--credential' , f"journal.storage={ 'persistent' if sys .stderr .isatty () else args .storage } " ,
523- * (['--runtime-build-sources=no' , '--register=no' ] if not sys .stderr .isatty () else []),
522+ '--credential' , f"journal.storage={ 'persistent' if sys .stdin .isatty () else args .storage } " ,
523+ * (['--runtime-build-sources=no' , '--register=no' ] if not sys .stdin .isatty () else []),
524524 'vm' if args .vm or os .getuid () != 0 or os .getenv ('TEST_PREFER_QEMU' , '0' ) == '1' else 'boot' ,
525525 ] # fmt: skip
526526
0 commit comments