Commit 915e38ce authored by Johannes Bechberger's avatar Johannes Bechberger

Fix small mjtest issue

parent 62e7ac8e
...@@ -191,13 +191,8 @@ class Environment: ...@@ -191,13 +191,8 @@ class Environment:
if os.path.exists(dst_file) and os.path.isfile(dst_file) and os.path.getmtime(file) < os.path.getmtime(dst_file) and False: if os.path.exists(dst_file) and os.path.isfile(dst_file) and os.path.getmtime(file) < os.path.getmtime(dst_file) and False:
_LOG.debug("File '{}' already exists in a pre processed form".format(os.path.relpath(file))) _LOG.debug("File '{}' already exists in a pre processed form".format(os.path.relpath(file)))
return dst_file return dst_file
cur = os.path.split(dst_file)[0]
while not os.path.exists(cur):
os.mkdir(cur)
cur = os.path.split(cur)[0]
if not os.path.exists(dst_dir): if not os.path.exists(dst_dir):
os.mkdir(dst_dir) os.makedirs(dst_dir, exist_ok=True)
try: try:
PreProcessor(file, import_base_dir, dst_file).preprocess() PreProcessor(file, import_base_dir, dst_file).preprocess()
except: except:
......
...@@ -43,7 +43,7 @@ class JavaExecTest(BasicSyntaxTest): ...@@ -43,7 +43,7 @@ class JavaExecTest(BasicSyntaxTest):
is_big_testcase = "big" in self.file is_big_testcase = "big" in self.file
timeout = self.env.big_timeout if is_big_testcase else self.env.timeout timeout = self.env.big_timeout if is_big_testcase else self.env.timeout
base_filename = path.basename(self.file).split(".")[0] base_filename = path.basename(self.file).split(".")[0]
tmp_dir = self.env.create_tmpdir() tmp_dir = self.env.create_pid_local_tmpdir()
shutil.copy(self.preprocessed_file, path.join(tmp_dir, base_filename + ".java")) shutil.copy(self.preprocessed_file, path.join(tmp_dir, base_filename + ".java"))
cwd = os.getcwd() cwd = os.getcwd()
os.chdir(tmp_dir) os.chdir(tmp_dir)
......
...@@ -352,6 +352,7 @@ class ExtensibleTestResult(TestResult): ...@@ -352,6 +352,7 @@ class ExtensibleTestResult(TestResult):
texts.append(self._ident(msg.content)) texts.append(self._ident(msg.content))
else: else:
texts.append(msg.content) texts.append(msg.content)
texts.append("")
else: else:
texts.append("{}: {}".format(msg.title, msg.content)) texts.append("{}: {}".format(msg.title, msg.content))
return "\n".join(texts) return "\n".join(texts)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment