From a3699557a3e4605788bb02a34de8a7979ec96629 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Thu, 30 Jun 2022 14:40:17 +0100 Subject: Tests: minor improvements. Added "go" availability check before trying to build an application. update_action() method used were possible and fixed bug with the relative path determination in test_static_chroot.py. Templates optimization and style fixes. --- test/unit/applications/lang/go.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/unit/applications/lang/go.py') diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py index 04af26e1..3db955f3 100644 --- a/test/unit/applications/lang/go.py +++ b/test/unit/applications/lang/go.py @@ -9,6 +9,11 @@ from unit.option import option class TestApplicationGo(TestApplicationProto): @staticmethod def prepare_env(script, name='app', static=False): + try: + subprocess.check_output(['which', 'go']) + except subprocess.CalledProcessError: + return None + temp_dir = option.temp_dir + '/go/' if not os.path.exists(temp_dir): -- cgit