]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - misc/build_helpers/test-osx-pkg.py
Fix a missing import in test-osx-pkg.py. refs #2393
[tahoe-lafs/tahoe-lafs.git] / misc / build_helpers / test-osx-pkg.py
index 664f05381379aee964d7e39c2b8530670d97d8ee..c39850195cc80cc11a94b462fb9efc7bf8fa905b 100644 (file)
@@ -32,7 +32,7 @@
 # characteristic: 14.1.0 (/Applications/tahoe.app/support/lib/python2.7/site-packages)
 # pyasn1-modules: 0.0.5 (/Applications/tahoe.app/support/lib/python2.7/site-packages/pyasn1_modules-0.0.5-py2.7.egg)
 
-import os, re, subprocess, tempfile, shutil
+import os, re, shutil, subprocess, sys, tempfile
 
 def test_osx_pkg(pkgfile):
     """ Return on success, raise exception on failure. """
@@ -85,7 +85,11 @@ def test_osx_pkg(pkgfile):
 
 
 if __name__ == '__main__':
-    print "Testing..."
-    test_osx_pkg('tahoe-lafs-osx.pkg')
+    pkgs = [fn for fn in os.listdir(".") if fn.endswith("-osx.pkg")]
+    if len(pkgs) != 1:
+        print "ERR: unable to find a single .pkg file:", pkgs
+        sys.exit(1)
+    print "Testing %s ..." % pkgs[0]
+    test_osx_pkg(pkgs[0])
     print "Looks OK!"