summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/unit/applications/lang/go.py30
-rw-r--r--test/unit/applications/lang/java.py8
2 files changed, 24 insertions, 14 deletions
diff --git a/test/unit/applications/lang/go.py b/test/unit/applications/lang/go.py
index 15ac1cd9..18345828 100644
--- a/test/unit/applications/lang/go.py
+++ b/test/unit/applications/lang/go.py
@@ -12,7 +12,8 @@ class TestApplicationGo(TestApplicationProto):
go_app = TestApplicationGo()
go_app.testdir = unit.testdir
- if go_app.prepare_env('empty', 'app').returncode == 0:
+ proc = go_app.prepare_env('empty', 'app')
+ if proc and proc.returncode == 0:
cls.available['modules']['go'] = []
return unit if not complete_check else unit.complete()
@@ -23,18 +24,23 @@ class TestApplicationGo(TestApplicationProto):
env = os.environ.copy()
env['GOPATH'] = self.pardir + '/go'
- process = Popen(
- [
- 'go',
- 'build',
- '-o',
- self.testdir + '/go/' + name,
- self.current_dir + '/go/' + script + '/' + name + '.go',
- ],
- env=env,
- )
- process.communicate()
+ try:
+ process = Popen(
+ [
+ 'go',
+ 'build',
+ '-o',
+ self.testdir + '/go/' + name,
+ self.current_dir + '/go/' + script + '/' + name + '.go',
+ ],
+ env=env,
+ )
+
+ process.communicate()
+
+ except:
+ return None
return process
diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py
index 40bf3662..bcf87f59 100644
--- a/test/unit/applications/lang/java.py
+++ b/test/unit/applications/lang/java.py
@@ -63,8 +63,12 @@ class TestApplicationJava(TestApplicationProto):
]
javac.extend(src)
- process = Popen(javac)
- process.communicate()
+ try:
+ process = Popen(javac)
+ process.communicate()
+
+ except:
+ self.fail('Cann\'t run javac process.')
self._load_conf(
{