Diff
Modified: trunk/Tools/ChangeLog (273383 => 273384)
--- trunk/Tools/ChangeLog 2021-02-24 13:21:57 UTC (rev 273383)
+++ trunk/Tools/ChangeLog 2021-02-24 14:01:05 UTC (rev 273384)
@@ -1,3 +1,21 @@
+2021-02-24 Don Olmstead <don.olmst...@sony.com>
+
+ Only import Python flatpak module on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=222327
+
+ Reviewed by Philippe Normand.
+
+ Importing flatpak is only relavent for GTK/WPE ports. Also Windows can fail when importing
+ it due to platform differences.
+
+ * Scripts/run-bindings-tests:
+ * Scripts/run-builtins-generator-tests:
+ * Scripts/run-minibrowser:
+ * Scripts/run-perf-tests:
+ * Scripts/run-webkit-httpd:
+ * Scripts/run-webkit-tests:
+ * Scripts/test-webkitpy:
+
2021-02-24 Aakash Jain <aakash_j...@apple.com>
Add unit-tests for various step in build.webkit.org
Modified: trunk/Tools/Scripts/run-bindings-tests (273383 => 273384)
--- trunk/Tools/Scripts/run-bindings-tests 2021-02-24 13:21:57 UTC (rev 273383)
+++ trunk/Tools/Scripts/run-bindings-tests 2021-02-24 14:01:05 UTC (rev 273384)
@@ -33,11 +33,13 @@
import sys
from webkitpy.common.system import executive
-top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
-sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
-import flatpakutils
-flatpakutils.run_in_sandbox_if_available(sys.argv)
+if sys.platform.startswith('linux'):
+ top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
+ sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
+ import flatpakutils
+ flatpakutils.run_in_sandbox_if_available(sys.argv)
+
def main(argv):
"""Runs WebCore bindings code generators on test IDL files and compares
the results with reference files.
Modified: trunk/Tools/Scripts/run-builtins-generator-tests (273383 => 273384)
--- trunk/Tools/Scripts/run-builtins-generator-tests 2021-02-24 13:21:57 UTC (rev 273383)
+++ trunk/Tools/Scripts/run-builtins-generator-tests 2021-02-24 14:01:05 UTC (rev 273384)
@@ -25,12 +25,14 @@
import sys
from webkitpy.common.system import executive
-import os
-top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
-sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
-import flatpakutils
-flatpakutils.run_in_sandbox_if_available(sys.argv)
+if sys.platform.startswith('linux'):
+ import os
+ top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
+ sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
+ import flatpakutils
+ flatpakutils.run_in_sandbox_if_available(sys.argv)
+
def main(argv):
"""Runs the JS builtins code generator on test input files and compares
the results with reference files.
Modified: trunk/Tools/Scripts/run-minibrowser (273383 => 273384)
--- trunk/Tools/Scripts/run-minibrowser 2021-02-24 13:21:57 UTC (rev 273383)
+++ trunk/Tools/Scripts/run-minibrowser 2021-02-24 14:01:05 UTC (rev 273384)
@@ -17,13 +17,14 @@
# Boston, MA 02110-1301, USA.
"""Wrapper around webkitpy/minibrowser/run_webkit_app.py"""
-import os
import sys
from webkitpy.minibrowser import run_webkit_app
-top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
if sys.platform.startswith('linux'):
+ import os
+ top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
+
import flatpakutils
flatpakutils.run_in_sandbox_if_available(sys.argv)
Modified: trunk/Tools/Scripts/run-perf-tests (273383 => 273384)
--- trunk/Tools/Scripts/run-perf-tests 2021-02-24 13:21:57 UTC (rev 273383)
+++ trunk/Tools/Scripts/run-perf-tests 2021-02-24 14:01:05 UTC (rev 273384)
@@ -30,14 +30,16 @@
"""Run performance tests."""
import logging
-import os
import sys
-top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
-sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
-import flatpakutils
-flatpakutils.run_in_sandbox_if_available(sys.argv)
+if sys.platform.startswith('linux'):
+ import os
+ top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
+ sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
+ import flatpakutils
+ flatpakutils.run_in_sandbox_if_available(sys.argv)
+
from webkitpy.performance_tests.perftestsrunner import PerfTestsRunner
if '__main__' == __name__:
Modified: trunk/Tools/Scripts/run-webkit-httpd (273383 => 273384)
--- trunk/Tools/Scripts/run-webkit-httpd 2021-02-24 13:21:57 UTC (rev 273383)
+++ trunk/Tools/Scripts/run-webkit-httpd 2021-02-24 14:01:05 UTC (rev 273384)
@@ -28,15 +28,15 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
import sys
from webkitpy.layout_tests.servers.run_webkit_httpd import parse_args, run_server
-
-top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
if sys.platform.startswith('linux'):
+ import os
+ top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
+
import flatpakutils
flatpakutils.run_in_sandbox_if_available(sys.argv)
Modified: trunk/Tools/Scripts/run-webkit-tests (273383 => 273384)
--- trunk/Tools/Scripts/run-webkit-tests 2021-02-24 13:21:57 UTC (rev 273383)
+++ trunk/Tools/Scripts/run-webkit-tests 2021-02-24 14:01:05 UTC (rev 273384)
@@ -30,14 +30,15 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Wrapper around webkitpy/layout_tests/run_webkit_tests.py"""
-import os
import sys
from webkitpy.common import multiprocessing_bootstrap
-top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
if sys.platform.startswith('linux'):
+ import os
+ top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
+
import flatpakutils
flatpakutils.run_in_sandbox_if_available(sys.argv)
Modified: trunk/Tools/Scripts/test-webkitpy (273383 => 273384)
--- trunk/Tools/Scripts/test-webkitpy 2021-02-24 13:21:57 UTC (rev 273383)
+++ trunk/Tools/Scripts/test-webkitpy 2021-02-24 14:01:05 UTC (rev 273384)
@@ -29,10 +29,14 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from webkitpy.common import multiprocessing_bootstrap
-import os, sys
-top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
-sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
-import flatpakutils
-flatpakutils.run_in_sandbox_if_available(sys.argv)
+import sys
+if sys.platform.startswith('linux'):
+ import os
+ top_level_directory = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
+ sys.path.insert(0, os.path.join(top_level_directory, 'Tools', 'flatpak'))
+
+ import flatpakutils
+ flatpakutils.run_in_sandbox_if_available(sys.argv)
+
multiprocessing_bootstrap.run('webkitpy', 'test', 'main.py')