1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.tradefed.observatory; 18 19 import com.android.tradefed.config.Option; 20 import com.android.tradefed.config.OptionClass; 21 import com.android.tradefed.config.filter.GlobalTestFilter; 22 23 import java.util.ArrayList; 24 import java.util.LinkedHashSet; 25 import java.util.List; 26 import java.util.Set; 27 28 /** 29 * A simple class to accept settings for the ConfigurationCtsParserSettings 30 * 31 * <p>To pass settings to this class, the alias is mandatory. So something like {@code --cts-params 32 * --compatibility:include-filter --cts-params CtsWebkitTestCases} will work. 33 */ 34 @OptionClass(alias = "compatibility") 35 public class ConfigurationCtsParserSettings { 36 @Option( 37 name = "cts-params", 38 description = "This option is for the purpose of filtering in all of its values.") 39 public List<String> mCtsParams = new ArrayList<>(); 40 41 @Option( 42 name = GlobalTestFilter.STRICT_INCLUDE_FILTER_OPTION, 43 description = 44 "Filters applied to the invocation. Format: [abi] [module-name]" 45 + " [test-class][#method-name]. All other filters " 46 + "will be ignored to strictly run this set." 47 + "This is still best-effort as not all runners " 48 + "support filtering equally.") 49 public Set<String> mStrictIncludeFilters = new LinkedHashSet<>(); 50 51 @Option( 52 name = "config-name", 53 description = "This option is for the purpose of filtering in all of its values.") 54 public String mConfigName = null; 55 56 @Option( 57 name = "rootdir-var", 58 description = 59 "Name of the variable to be passed as -D " 60 + "parameter to the java call to specify the root directory.") 61 public String mRootdirVar = "CTS_ROOT"; 62 } 63