[Pkg-mozext-commits] [adblock-plus] 335/464: Fixed: running js on Linux requires LD_LIBRARY_PATH to be set

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 9d4113b797798355cf853cd8d5199b4aa0db3aa1
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Fri Dec 14 18:25:30 2012 +0100

    Fixed: running js on Linux requires LD_LIBRARY_PATH to be set
---
 abp_rewrite.py | 7 +++++--
 autotest.py    | 5 ++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/abp_rewrite.py b/abp_rewrite.py
index 5bb16dd..0e829ff 100644
--- a/abp_rewrite.py
+++ b/abp_rewrite.py
@@ -25,6 +25,9 @@ def doRewrite():
     basedir = '.'
 
   application = ensureJSShell(basedir)
+  env = {
+    'LD_LIBRARY_PATH': os.path.dirname(application),
+  }
   command = [application, '-U', os.path.join(basedir, 'jshydra.js'), os.path.join(basedir, 'scripts', 'abprewrite.js'), '--arg', 'module=true source_repo=https://hg.adblockplus.org/adblockplus/']
   for module in ('filterNotifier', 'filterClasses', 'subscriptionClasses', 'filterStorage', 'elemHide', 'matcher', 'filterListener', 'synchronizer'):
     sourceFile = os.path.join(sourceDir, 'lib', module + '.js')
@@ -34,7 +37,7 @@ def doRewrite():
     command.append(sourceFile)
 
   out = open(os.path.join(targetDir, 'lib', 'adblockplus.js'), 'wb')
-  subprocess.Popen(command, stdout=out).communicate()
+  subprocess.Popen(command, stdout=out, env=env).communicate()
 
   command = [application, '-U', os.path.join(basedir, 'jshydra.js'), os.path.join(basedir, 'scripts', 'abprewrite.js'), '--arg', 'source_repo=https://hg.adblockplus.org/adblockplustests/']
   for test in ('domainRestrictions', 'filterClasses', 'filterNotifier', 'filterStorage', 'matcher', 'regexpFilters_matching', 'subscriptionClasses'):
@@ -45,7 +48,7 @@ def doRewrite():
     command.append(sourceFile)
 
   out = open(os.path.join(targetDir, 'qunit', 'tests', 'adblockplus.js'), 'wb')
-  subprocess.Popen(command, stdout=out).communicate()
+  subprocess.Popen(command, stdout=out, env=env).communicate()
 
 if __name__ == '__main__':
   doRewrite()
diff --git a/autotest.py b/autotest.py
index 4b2069e..5946745 100644
--- a/autotest.py
+++ b/autotest.py
@@ -14,6 +14,9 @@ def run_tests():
     basedir = '.'
 
   application = ensureJSShell(basedir)
+  env = {
+    'LD_LIBRARY_PATH': os.path.dirname(application),
+  }
   testdir = os.path.join(basedir, 'autotest')
   for file in os.listdir(testdir):
     if not re.search(r'^test_.*\.js$', file):
@@ -35,7 +38,7 @@ def run_tests():
       continue
 
     command = [application, '-U', os.path.join(basedir, 'jshydra.js'), file] + arguments
-    out = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0].replace('\r', '')
+    out = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env).communicate()[0].replace('\r', '')
     expected = open(file + '.expected', 'r').read().replace('\r', '')
     if out == expected:
       print '%s passed' % name

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list