If a test has variants, do not add the base test class because that will just cause...
[SquirrelJME.git] / buildSrc / src / main / java / cc / squirreljme / plugin / multivm / DefunctTestTask.java
blob303273f80ad8f916abd4f771b5a58e83f5fd6df3
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc.squirreljme.plugin.multivm;
12 import javax.inject.Inject;
13 import org.gradle.api.Task;
14 import org.gradle.api.tasks.testing.Test;
16 /**
17 * This represents a test task which is defunct, it relies on another task
18 * for testing.
20 * @since 2020/10/07
22 public class DefunctTestTask
23 extends Test
25 /**
26 * Initializes the test.
28 * @since 2020/10/07
30 @Inject
31 public DefunctTestTask()
33 // Set details of this task
34 this.setGroup("defunct");
35 this.setDescription("Defunct test task, relies on another test task.");
37 // Never runs
38 this.onlyIf(new AlwaysFalse());
40 // Depend on testHosted since all of the tests are there and those
41 // may assume as such
42 this.dependsOn(this.getProject()
43 .getTasks().findByName("testHosted"));
45 // Make sure the task fails as quickly as possibles
46 this.doFirst(new DefunctTestTaskAction());