]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqa/selftest: Fix broken symlink removal handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Sep 2023 15:54:54 +0000 (16:54 +0100)
committerSteve Sakoman <steve@sakoman.com>
Thu, 19 Oct 2023 14:34:38 +0000 (04:34 -1000)
The test above this removal correctly looks at symlinks however to
remove a symlink we should call unlink(), not remove(). This avoids
some build failures/tracebacks.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit dbdb6e73b0f52bc5f9429aca47802d51edbbc834)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/selftest/context.py

index 39325f4b7248c5035e43492824289a08678eeade..3fb357f8ebfd878acbae68dfaa8c43b9fcce9894 100644 (file)
@@ -427,7 +427,7 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
             output_link = os.path.join(os.path.dirname(args.output_log),
                     "%s-results.log" % self.name)
             if os.path.lexists(output_link):
-                os.remove(output_link)
+                os.unlink(output_link)
             os.symlink(args.output_log, output_link)
 
         return rc