1 /****************************************************************************
2 **
3 ** Copyright (C) 2016 The Qt Company Ltd.
4 ** Copyright (C) 2019 Jochen Ulrich <jochenulrich@t-online.de>
5 ** Contact: https://www.qt.io/licensing/
6 **
7 ** This file is part of Qbs.
8 **
9 ** $QT_BEGIN_LICENSE:GPL-EXCEPT$
10 ** Commercial License Usage
11 ** Licensees holding valid commercial Qt licenses may use this file in
12 ** accordance with the commercial license agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and The Qt Company. For licensing terms
15 ** and conditions see https://www.qt.io/terms-conditions. For further
16 ** information use the contact form at https://www.qt.io/contact-us.
17 **
18 ** GNU General Public License Usage
19 ** Alternatively, this file may be used under the terms of the GNU
20 ** General Public License version 3 as published by the Free Software
21 ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
22 ** included in the packaging of this file. Please review the following
23 ** information to ensure the GNU General Public License requirements will
24 ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
25 **
26 ** $QT_END_LICENSE$
27 **
28 ****************************************************************************/
29 
30 #ifndef TST_BLACKBOX_H
31 #define TST_BLACKBOX_H
32 
33 #include "tst_blackboxbase.h"
34 
35 class TestBlackbox : public TestBlackboxBase
36 {
37     Q_OBJECT
38 
39 public:
40     TestBlackbox();
41 
42 private slots:
43     void allowedValues();
44     void allowedValues_data();
45     void addFileTagToGeneratedArtifact();
46     void alwaysRun();
47     void alwaysRun_data();
48     void artifactsMapChangeTracking();
49     void artifactsMapInvalidation();
50     void artifactsMapRaceCondition();
51     void artifactScanning();
52     void assembly();
53     void autotestWithDependencies();
54     void autotestTimeout();
55     void autotestTimeout_data();
56     void autotests_data();
57     void autotests();
58     void auxiliaryInputsFromDependencies();
59     void badInterpreter();
60     void bomSources();
61     void buildDataOfDisabledProduct();
62     void buildDirectories();
63     void buildEnvChange();
64     void buildGraphVersions();
65     void buildVariantDefaults_data();
66     void buildVariantDefaults();
67     void capnproto();
68     void capnproto_data();
69     void changedFiles_data();
70     void changedFiles();
71     void changedInputsFromDependencies();
72     void changedRuleInputs();
73     void changeInDisabledProduct();
74     void changeInImportedFile();
75     void changeTrackingAndMultiplexing();
76     void checkProjectFilePath();
77     void checkTimestamps();
78     void chooseModuleInstanceByPriority();
79     void chooseModuleInstanceByPriority_data();
80     void clean();
81     void cli();
82     void combinedSources();
83     void commandFile();
84     void compilerDefinesByLanguage();
85     void concurrentExecutor();
86     void conditionalExport();
87     void conditionalFileTagger();
88     void configure();
89     void conflictingArtifacts();
90     void cxxLanguageVersion();
91     void cxxLanguageVersion_data();
92     void conanfileProbe_data();
93     void conanfileProbe();
94     void cpuFeatures();
95     void dependenciesProperty();
96     void dependencyScanningLoop();
97     void deprecatedProperty();
98     void disappearedProfile();
99     void discardUnusedData();
100     void discardUnusedData_data();
101     void driverLinkerFlags();
102     void driverLinkerFlags_data();
103     void dynamicLibraryInModule();
104     void dynamicMultiplexRule();
105     void dynamicProject();
106     void dynamicRuleOutputs();
107     void emptyProfile();
108     void enableExceptions();
109     void enableExceptions_data();
110     void enableRtti();
111     void envMerging();
112     void envNormalization();
113     void erroneousFiles_data();
114     void erroneousFiles();
115     void errorInfo();
116     void escapedLinkerFlags();
117     void explicitlyDependsOn();
118     void explicitlyDependsOn_data();
119     void exportedDependencyInDisabledProduct();
120     void exportedDependencyInDisabledProduct_data();
121     void exportedPropertyInDisabledProduct();
122     void exportedPropertyInDisabledProduct_data();
123     void exportRule();
124     void exportToOutsideSearchPath();
125     void exportsPkgconfig();
126     void exportsQbs();
127     void externalLibs();
128     void fileDependencies();
129     void fileTagsFilterMerging();
130     void freedesktop();
131     void generatedArtifactAsInputToDynamicRule();
132     void generateLinkerMapFile();
133     void generator();
134     void generator_data();
135     void groupsInModules();
136     void grpc_data();
137     void grpc();
138     void hostOsProperties();
139     void ico();
140     void importAssignment();
141     void importChangeTracking();
142     void importInPropertiesCondition();
143     void importSearchPath();
144     void importingProduct();
145     void importsConflict();
146     void includeLookup();
147     void inputTagsChangeTracking_data();
148     void inputTagsChangeTracking();
149     void inputsFromDependencies();
150     void installable();
151     void installableAsAuxiliaryInput();
152     void installedApp();
153     void installDuplicates();
154     void installDuplicatesNoError();
155     void installedSourceFiles();
156     void installedTransformerOutput();
157     void installLocations_data();
158     void installLocations();
159     void installPackage();
160     void installRootFromProjectFile();
161     void installTree();
162     void invalidCommandProperty_data();
163     void invalidCommandProperty();
164     void invalidExtensionInstantiation();
165     void invalidExtensionInstantiation_data();
166     void invalidInstallDir();
167     void invalidLibraryNames();
168     void invalidLibraryNames_data();
169     void jsExtensionsFile();
170     void jsExtensionsFileInfo();
171     void jsExtensionsProcess();
172     void jsExtensionsPropertyList();
173     void jsExtensionsTemporaryDir();
174     void jsExtensionsTextFile();
175     void jsExtensionsBinaryFile();
176     void lastModuleCandidateBroken();
177     void ld();
178     void linkerMode();
179     void linkerVariant_data();
180     void linkerVariant();
181     void lexyacc();
182     void lexyaccOutputs();
183     void lexyaccOutputs_data();
184     void linkerLibraryDuplicates();
185     void linkerLibraryDuplicates_data();
186     void linkerScripts();
187     void linkerModuleDefinition();
188     void listProducts();
189     void listPropertiesWithOuter();
190     void listPropertyOrder();
191     void loadableModule();
192     void localDeployment();
193     void makefileGenerator();
194     void maximumCLanguageVersion();
195     void maximumCxxLanguageVersion();
196     void moduleProviders();
197     void fallbackModuleProvider_data();
198     void fallbackModuleProvider();
199     void minimumSystemVersion();
200     void minimumSystemVersion_data();
201     void missingBuildGraph();
202     void missingBuildGraph_data();
203     void missingDependency();
204     void missingProjectFile();
205     void missingOverridePrefix();
206     void moduleConditions();
207     void movedFileDependency();
208     void multipleChanges();
209     void multipleConfigurations();
210     void multiplexedTool();
211     void nestedGroups();
212     void nestedProperties();
213     void newOutputArtifact();
214     void noExportedSymbols_data();
215     void noExportedSymbols();
216     void noProfile();
217     void noSuchProfile();
218     void nodejs();
219     void nonBrokenFilesInBrokenProduct();
220     void nonDefaultProduct();
221     void notAlwaysUpdated();
222     void nsis();
223     void nsisDependencies();
224     void outOfDateMarking();
225     void outputArtifactAutoTagging();
226     void outputRedirection();
227     void overrideProjectProperties();
228     void pathProbe_data();
229     void pathProbe();
230     void pchChangeTracking();
231     void perGroupDefineInExportItem();
232     void pkgConfigProbe();
233     void pkgConfigProbe_data();
234     void pkgConfigProbeSysroot();
235     void pluginDependency();
236     void precompiledAndPrefixHeaders();
237     void precompiledHeaderAndRedefine();
238     void preventFloatingPointValues();
239     void probeChangeTracking();
240     void probeProperties();
241     void probesAndShadowProducts();
242     void probeInExportedModule();
243     void probesAndArrayProperties();
244     void probesInNestedModules();
245     void productDependenciesByType();
246     void productInExportedModule();
247     void productProperties();
248     void propertyAssignmentOnNonPresentModule();
249     void propertyAssignmentInFailedModule();
250     void propertyChanges();
251     void propertyEvaluationContext();
252     void propertyPrecedence();
253     void properQuoting();
254     void propertiesInExportItems();
255     void protobuf_data();
256     void protobuf();
257     void protobufLibraryInstall();
258     void providersProperties();
259     void pseudoMultiplexing();
260     void qbsConfig();
261     void qbsConfigAddProfile();
262     void qbsConfigAddProfile_data();
263     void qbsModuleProviders();
264     void qbsModuleProviders_data();
265     void qbsModuleProvidersCliOverride();
266     void qbsModuleProvidersCliOverride_data();
267     void qbsModuleProvidersCompatibility();
268     void qbsModuleProvidersCompatibility_data();
269     void qbspkgconfigModuleProvider();
270     void qbsSession();
271     void qbsVersion();
272     void qtBug51237();
273     void radAfterIncompleteBuild();
274     void radAfterIncompleteBuild_data();
275     void recursiveRenaming();
276     void recursiveWildcards();
277     void referenceErrorInExport();
278     void removeDuplicateLibraries_data();
279     void removeDuplicateLibraries();
280     void reproducibleBuild();
281     void reproducibleBuild_data();
282     void require();
283     void requireDeprecated();
284     void rescueTransformerData();
285     void responseFiles();
286     void retaggedOutputArtifact();
287     void ruleConditions();
288     void ruleConnectionWithExcludedInputs();
289     void ruleCycle();
290     void ruleWithNoInputs();
291     void ruleWithNonRequiredInputs();
292     void sanitizer_data();
293     void sanitizer();
294     void scannerItem();
295     void scanResultInOtherProduct();
296     void scanResultInNonDependency();
297     void setupBuildEnvironment();
298     void setupRunEnvironment();
299     void smartRelinking();
300     void smartRelinking_data();
301     void soVersion();
302     void soVersion_data();
303     void sourceArtifactChanges();
304     void subProfileChangeTracking();
305     void successiveChanges();
306     void symbolLinkMode();
307     void symlinkRemoval();
308     void renameDependency();
309     void separateDebugInfo();
310     void sevenZip();
311     void sourceArtifactInInputsFromDependencies();
312     void staticLibWithoutSources();
313     void suspiciousCalls();
314     void suspiciousCalls_data();
315     void systemIncludePaths();
316     void distributionIncludePaths();
317     void systemRunPaths();
318     void systemRunPaths_data();
319     void tar();
320     void textTemplate();
321     void toolLookup();
322     void topLevelSearchPath();
323     void trackAddFile();
324     void trackAddFileTag();
325     void trackAddProduct();
326     void trackExternalProductChanges();
327     void trackGroupConditionChange();
328     void trackRemoveFile();
329     void trackRemoveFileTag();
330     void trackRemoveProduct();
331     void transitiveInvalidDependencies();
332     void transitiveOptionalDependencies();
333     void typescript();
334     void undefinedTargetPlatform();
335     void usingsAsSoleInputsNonMultiplexed();
336     void variantSuffix();
337     void variantSuffix_data();
338     void vcsGit();
339     void vcsSubversion();
340     void versionCheck();
341     void versionCheck_data();
342     void versionScript();
343     void wholeArchive();
344     void wholeArchive_data();
345     void wildCardsAndRules();
346     void wildcardRenaming();
347     void zip();
348     void zip_data();
349     void zipInvalid();
350 
351 private:
352     QMap<QString, QString> findCli(int *status);
353     QMap<QString, QString> findNodejs(int *status);
354     QMap<QString, QString> findTypeScript(int *status);
355     QString findArchiver(const QString &fileName, int *status = nullptr);
356     static bool lexYaccExist();
357     static qbs::Version bisonVersion();
358 };
359 
360 #endif // TST_BLACKBOX_H
361