mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:28:53 +08:00
mavsdk_tests: fix verbose output
This commit is contained in:
@@ -7,6 +7,7 @@ import errno
|
||||
import os
|
||||
import psutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
test_matrix = [
|
||||
@@ -42,7 +43,7 @@ class Runner:
|
||||
datetime.datetime.now().strftime("%Y-%m-%dT%H-%M-%SZ")
|
||||
), 'w')
|
||||
else:
|
||||
f = subprocess.STDOUT
|
||||
f = None
|
||||
|
||||
print("Running: {}".format(" ".join([self.cmd] + self.args)))
|
||||
|
||||
@@ -50,8 +51,8 @@ class Runner:
|
||||
[self.cmd] + self.args,
|
||||
cwd=self.cwd,
|
||||
env=self.env,
|
||||
# FIXME: this is currently not working
|
||||
# stdout=subprocess.STDOUT
|
||||
stdout=f,
|
||||
stderr=f
|
||||
)
|
||||
|
||||
atexit.register(self.stop)
|
||||
@@ -199,12 +200,12 @@ def main():
|
||||
help="Directory for log files, stdout if not provided")
|
||||
parser.add_argument("--speed-factor", default=1,
|
||||
help="How fast to run the simulation")
|
||||
parser.add_argument("--gui", default=False,
|
||||
parser.add_argument("--gui", default=False, action='store_true',
|
||||
help="Display gzclient with")
|
||||
args = parser.parse_args()
|
||||
|
||||
if not is_everything_ready():
|
||||
return 1
|
||||
sys.exit(1)
|
||||
|
||||
overall_success = True
|
||||
|
||||
@@ -253,7 +254,7 @@ def main():
|
||||
|
||||
print("Overall result: {}".
|
||||
format("SUCCESS" if overall_success else "FAIL"))
|
||||
return 0 if overall_success else 1
|
||||
sys.exit(0 if overall_success else 1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -23,7 +23,7 @@ TEST_CASE("Takeoff and land", "[multicopter][vtol]")
|
||||
tester.wait_until_disarmed();
|
||||
}
|
||||
|
||||
TEST_CASE("Fly a square missions", "[multicopter][vtol]")
|
||||
TEST_CASE("Fly square missions", "[multicopter][vtol]")
|
||||
{
|
||||
AutopilotTester tester;
|
||||
tester.connect(connection_url);
|
||||
|
||||
Reference in New Issue
Block a user