// Gentoo dependencies. gradle.afterProject { project -> if (project == project.rootProject) { def python = System.getenv('EPYTHON') if (!python) { throw new GradleException('EPYTHON is not set') } project.ext.PYTHON3 = [python] } if (project.path == ':Base') { def classpath = System.getenv('GENTOO_JAVACC_CLASSPATH') if (!classpath) { throw new GradleException('GENTOO_JAVACC_CLASSPATH is not set') } def javacc = project.configurations.getByName('javacc') javacc.dependencies.clear() project.dependencies.add( 'javacc', project.files(classpath.split(File.pathSeparator)) ) } } // upstream sets ignoreFailures on every test task, so a failing suite passes def gentooExcludedTests = [ // expectations are metrics of Font("Times New Roman"), which only // media-fonts/corefonts provides 'docking.widgets.fieldpanel.FlowLayoutTextFieldTest', 'docking.widgets.fieldpanel.VerticalLayoutTextFieldTest', 'docking.widgets.fieldpanel.field.CompositeVerticalLayoutTextFieldTest', 'docking.widgets.tab.GTabPanelTest', // load programs from ghidra.bin, which upstream does not publish 'ghidra.features.bsim.query.facade.SimilarFunctionQueryServiceTest', 'ghidra.features.codecompare.decompile.DualDecompilerActionTest', 'ghidra.feature.vt.api.BSimSelfSimilarCorrelatorTest', // Swing tests polled through waitForPass; not deterministic under Xvfb 'ghidra.app.plugin.core.debug.*', 'datagraph.graph.*', ] gradle.taskGraph.whenReady { graph -> graph.allTasks.findAll { it instanceof org.gradle.api.tasks.testing.Test }.each { t -> t.ignoreFailures = false // a module emptied by an exclude reports green with nothing run t.filter.failOnNoMatchingTests = false gentooExcludedTests.each { t.filter.excludeTestsMatching it } } }