diff --git a/mozilla/htmlparser/tests/outsinks/TestOutSinks.pl b/mozilla/htmlparser/tests/outsinks/TestOutSinks.pl
index 144f3dcae6f..8640182444d 100755
--- a/mozilla/htmlparser/tests/outsinks/TestOutSinks.pl
+++ b/mozilla/htmlparser/tests/outsinks/TestOutSinks.pl
@@ -22,9 +22,12 @@
#
# This is a collection of test files to guard against regressions
-# in the Gecko output system.
+# in the Mozilla output system.
#
+# Make sure . is in the path, so we can load the other shared libraries
+$ENV{LD_LIBRARY_PATH} .= ":.";
+
$errmsg = "";
print "Testing simple html to html ...\n";
diff --git a/mozilla/parser/htmlparser/tests/outsinks/TestOutSinks.pl b/mozilla/parser/htmlparser/tests/outsinks/TestOutSinks.pl
index 144f3dcae6f..8640182444d 100755
--- a/mozilla/parser/htmlparser/tests/outsinks/TestOutSinks.pl
+++ b/mozilla/parser/htmlparser/tests/outsinks/TestOutSinks.pl
@@ -22,9 +22,12 @@
#
# This is a collection of test files to guard against regressions
-# in the Gecko output system.
+# in the Mozilla output system.
#
+# Make sure . is in the path, so we can load the other shared libraries
+$ENV{LD_LIBRARY_PATH} .= ":.";
+
$errmsg = "";
print "Testing simple html to html ...\n";