tesh -- testing shell
========================
-Copyright (c) 2012-2022. The SimGrid Team. All rights reserved.
+Copyright (c) 2012-2023. The SimGrid Team. All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of the license (GNU LGPL) which comes with this package.
#
#
-def is_windows():
- """ Check if running on Windows """
- return sys.platform.startswith('win')
-
# Singleton metaclass that works in Python 2 & 3
# http://stackoverflow.com/questions/6760685/creating-a-singleton-in-python
def kill_process_group(pid):
""" This function send TERM signal + KILL signal after 0.2s to the group of the specified process """
if pid is None:
- # Nobody to kill. We don't know who to kill on windows, or we don't have anyone to kill on signal handler
+ # Nobody to kill. We don't have anyone to kill on signal handler
return
try:
local_pid = None
try:
- preexec_function = None
- if not is_windows():
- preexec_function = lambda: os.setpgid(0, 0)
+ preexec_function = lambda: os.setpgid(0, 0)
proc = subprocess.Popen( # pylint: disable=subprocess-popen-preexec-fn
args,
bufsize=1,
stderr=subprocess.STDOUT,
universal_newlines=True,
preexec_fn=preexec_function)
- if not is_windows():
- local_pid = proc.pid
- TeshState().running_pids.append(local_pid)
+ local_pid = proc.pid
+ TeshState().running_pids.append(local_pid)
except PermissionError:
logs.append("[{file}:{number}] Cannot start '{cmd}': The binary is not executable.".format(
file=FileReader().filename, number=self.linenumber, cmd=args[0]))
re.compile(r"profiling:"),
re.compile(r"Unable to clean temporary file C:"),
re.compile(r".*Configuration change: Set 'contexts/"),
- re.compile(r"Picked up JAVA_TOOL_OPTIONS: "),
- re.compile(r"Picked up _JAVA_OPTIONS: "),
re.compile(r"==[0-9]+== ?WARNING: ASan doesn't fully support"),
re.compile(r"==[0-9]+== ?WARNING: ASan is ignoring requested __asan_handle_no_return: stack "),
re.compile(r"False positive error reports may follow"),
cmd.add_ignore(line[len("! ignore "):])
else:
- fatal_error("UNRECOGNIZED OPTION")
+ fatal_error(f"UNRECOGNIZED OPTION LINE: {line}")
line = file.readfullline()