Title: [273307] trunk/Tools
- Revision
- 273307
- Author
- [email protected]
- Date
- 2021-02-23 08:18:08 -0800 (Tue, 23 Feb 2021)
Log Message
Detect unrecognized options in run-_javascript_core-tests
https://bugs.webkit.org/show_bug.cgi?id=221186
Patch by Angelos Oikonomopoulos <[email protected]> on 2021-02-23
Reviewed by Keith Miller.
run-_javascript_core-tests saves unrecognized arguments to pass
through to build-jsc even when --no-build is used. However, when
we're not building, nothing will ever use or look at the extra
arguments. This means that those arguments are silently eaten
up and, consequently, typos in option names can go undetected.
Change the script to fail when --no-build has been passed and
there are unrecognized options.
* Scripts/run-_javascript_core-tests:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (273306 => 273307)
--- trunk/Tools/ChangeLog 2021-02-23 15:05:07 UTC (rev 273306)
+++ trunk/Tools/ChangeLog 2021-02-23 16:18:08 UTC (rev 273307)
@@ -1,3 +1,21 @@
+2021-02-23 Angelos Oikonomopoulos <[email protected]>
+
+ Detect unrecognized options in run-_javascript_core-tests
+ https://bugs.webkit.org/show_bug.cgi?id=221186
+
+ Reviewed by Keith Miller.
+
+ run-_javascript_core-tests saves unrecognized arguments to pass
+ through to build-jsc even when --no-build is used. However, when
+ we're not building, nothing will ever use or look at the extra
+ arguments. This means that those arguments are silently eaten
+ up and, consequently, typos in option names can go undetected.
+
+ Change the script to fail when --no-build has been passed and
+ there are unrecognized options.
+
+ * Scripts/run-_javascript_core-tests:
+
2021-02-23 Frederic Wang <[email protected]>
[GTK] Use std::bitset to specify WebKitTestServer's options
Modified: trunk/Tools/Scripts/run-_javascript_core-tests (273306 => 273307)
--- trunk/Tools/Scripts/run-_javascript_core-tests 2021-02-23 15:05:07 UTC (rev 273306)
+++ trunk/Tools/Scripts/run-_javascript_core-tests 2021-02-23 16:18:08 UTC (rev 273307)
@@ -484,9 +484,23 @@
$runJSCStress = enableTestOrNot($runJSCStress);
$runMozillaTests = enableTestOrNot($runMozillaTests);
-# Assume any arguments left over from GetOptions are assumed to be build arguments
-my @buildArgs = @ARGV;
+my @buildArgs;
+if ($buildJSC) {
+ # Assume any arguments left over from GetOptions are to be passed as build arguments.
+ @buildArgs = @ARGV;
+} elsif (scalar(@ARGV) > 0) {
+ foreach (@ARGV) {
+ my $arg = $_;
+ if ($arg =~ /^-.*/) {
+ print STDERR "Unrecognized option `$arg'\n";
+ } else {
+ print STDERR "Stray anonymous argument `$arg'\n";
+ }
+ }
+ exit 2;
+}
+
if ($showHelp) {
print STDERR $usage;
exit 1;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes