@@ -911,7 +911,7 @@ void update_exclude_dirs(void)
911
911
lp -> count = count ;
912
912
}
913
913
914
- void load_config (const char * filename )
914
+ void load_config (const char * filename , const char * ignore )
915
915
{
916
916
char buf [1024 ];
917
917
FILE * f ;
@@ -966,6 +966,10 @@ void load_config(const char *filename)
966
966
printf ("%s:%d: syntax error\n" , filename , lineno );
967
967
continue ;
968
968
}
969
+ if (strstr (ignore , p )) {
970
+ printf ("%s:%d: ignoring %s=%s\n" , filename , lineno , p , q );
971
+ continue ;
972
+ }
969
973
if (str_equal (p , "style" )) {
970
974
new_style = str_equal (q , "new" );
971
975
continue ;
@@ -1981,6 +1985,8 @@ int main(int argc, char **argv)
1981
1985
BOOL is_dir_list ;
1982
1986
BOOL only_check_errors = FALSE;
1983
1987
const char * filename ;
1988
+ const char * config = NULL ;
1989
+ const char * ignore = "" ;
1984
1990
BOOL is_test262_harness = FALSE;
1985
1991
BOOL is_module = FALSE;
1986
1992
@@ -2014,14 +2020,16 @@ int main(int argc, char **argv)
2014
2020
} else if (str_equal (arg , "-v" )) {
2015
2021
verbose ++ ;
2016
2022
} else if (str_equal (arg , "-c" )) {
2017
- load_config ( get_opt_arg (arg , argv [optind ++ ]) );
2023
+ config = get_opt_arg (arg , argv [optind ++ ]);
2018
2024
} else if (str_equal (arg , "-d" )) {
2025
+ ignore = "testdir" ; // don't run all tests, just the ones from -d
2019
2026
enumerate_tests (get_opt_arg (arg , argv [optind ++ ]));
2020
2027
} else if (str_equal (arg , "-e" )) {
2021
2028
error_filename = get_opt_arg (arg , argv [optind ++ ]);
2022
2029
} else if (str_equal (arg , "-x" )) {
2023
2030
namelist_load (& exclude_list , get_opt_arg (arg , argv [optind ++ ]));
2024
2031
} else if (str_equal (arg , "-f" )) {
2032
+ ignore = "testdir" ; // don't run all tests, just the one from -f
2025
2033
is_dir_list = FALSE;
2026
2034
} else if (str_equal (arg , "-r" )) {
2027
2035
report_filename = get_opt_arg (arg , argv [optind ++ ]);
@@ -2039,6 +2047,9 @@ int main(int argc, char **argv)
2039
2047
}
2040
2048
}
2041
2049
2050
+ if (config )
2051
+ load_config (config , ignore );
2052
+
2042
2053
if (optind >= argc && !test_list .count )
2043
2054
help ();
2044
2055
0 commit comments