[Git][NTPsec/ntpsec][buildtest] Added symlink existence check to build test script

Ian Bruene gitlab at mg.gitlab.com
Sat Dec 2 16:25:32 UTC 2017


Ian Bruene pushed to branch buildtest at NTPsec / ntpsec


Commits:
1e6ee8c2 by Ian Bruene at 2017-12-02T10:24:52-06:00
Added symlink existence check to build test script

- - - - -


1 changed file:

- tests/wscript


Changes:

=====================================
tests/wscript
=====================================
--- a/tests/wscript
+++ b/tests/wscript
@@ -118,7 +118,12 @@ def build(ctx):
 
     pypath = pylib.get_bld()
     linkpath = ctx.bldnode.make_node("tests/pylib/ntp")
-    os.symlink(pypath.abspath(), linkpath.abspath())
+    if (not linkpath.exists()) or os.readlink(linkpath.abspath())):
+        try:
+            os.remove(linkpath.abspath())
+        except OSError:
+            pass
+        os.symlink(pypath.abspath(), linkpath.abspath())
 
     ctx(
         features="pytest",



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1e6ee8c2aae535e4864a950ed10a1605bbd1ed66

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1e6ee8c2aae535e4864a950ed10a1605bbd1ed66
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20171202/fb819316/attachment.html>


More information about the vc mailing list