From 30367d2410679a25bd7c718e2aa25cff39f029c2 Mon Sep 17 00:00:00 2001 From: Vadim Liventsev Date: Wed, 22 Nov 2023 16:03:44 +0100 Subject: [PATCH] Check for build artefacts after compilation --- programlib/program.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/programlib/program.py b/programlib/program.py index d8d1312..85c91e4 100644 --- a/programlib/program.py +++ b/programlib/program.py @@ -64,8 +64,13 @@ def __init__(self, source=None, name=None, language='C++', self.stdout, self.exitstatus = self.language.build(self.name) - # Please send your opinions on 'not not' vs 'bool()' to dont@vadim.me - self.compile_error = not not self.exitstatus + # Please send your opinions on 'not not' vs 'bool()' to dont@vadim.me + self.compile_error = not not self.exitstatus + + for artefact in self.language.artefacts: + # Compiler returned exit status zero, but a build artefact is missing + if not Path(artefact.format(name=self.name)).exists(): + self.compile_error = True def __lt__(self, other): return self.name < other.name