Refactored tagging system
This commit is contained in:
parent
e16b83434c
commit
27f9db2cb6
@ -58,7 +58,7 @@ class TaggingPlugin implements Plugin<Project> {
|
||||
File errFile = new File(file.parentFile, baseName + '.err')
|
||||
|
||||
javaTask.configure {
|
||||
ignoreExitValue = tags.validateByHand || tags.throwsException
|
||||
ignoreExitValue = tags.excludeFromGradle || tags.throwsException
|
||||
doFirst {
|
||||
if(outFile.exists())
|
||||
outFile.delete()
|
||||
@ -77,7 +77,7 @@ class TaggingPlugin implements Plugin<Project> {
|
||||
}
|
||||
}
|
||||
|
||||
if (!tags.validateByHand) {
|
||||
if (!tags.excludeFromGradle) {
|
||||
// Only add tasks that we know we can run successfully to the task list
|
||||
createdTasks.add(javaTask)
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ class Tags {
|
||||
Boolean lowLevelAppendix = false
|
||||
Boolean throwsException = false
|
||||
Boolean errorOutputExpected = false
|
||||
Boolean validateByHand = false
|
||||
Boolean excludeFromGradle = false
|
||||
Boolean ignoreOutput = false // This tag isn't used in the build...
|
||||
String fileRoot
|
||||
String mainClass
|
||||
@ -44,7 +44,7 @@ class Tags {
|
||||
lowLevelAppendix = firstLine.contains("// lowlevel/")
|
||||
throwsException = hasTag('ThrowsException')
|
||||
errorOutputExpected = hasTag('ErrorOutputExpected')
|
||||
validateByHand = hasTag('ValidateByHand')
|
||||
excludeFromGradle = hasTag('ExcludeFromGradle')
|
||||
ignoreOutput = hasTag('IgnoreOutput')
|
||||
javap = extract('javap') // Includes only arguments to command
|
||||
runFirst = extract('RunFirst:')
|
||||
@ -82,7 +82,7 @@ class Tags {
|
||||
excludeFromCI ||
|
||||
throwsException ||
|
||||
errorOutputExpected ||
|
||||
validateByHand ||
|
||||
excludeFromGradle ||
|
||||
ignoreOutput ||
|
||||
javaCmd ||
|
||||
args ||
|
||||
@ -104,7 +104,7 @@ class Tags {
|
||||
excludeFromCI
|
||||
throwsException
|
||||
errorOutputExpected
|
||||
validateByHand
|
||||
excludeFromGradle
|
||||
ignoreOutput
|
||||
fileRoot
|
||||
mainClass
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.util.*;
|
||||
|
||||
public class EnvironmentVariables {
|
||||
|
@ -3,7 +3,7 @@
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {java GZIPcompress GZIPcompress.java}
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.util.zip.*;
|
||||
import java.io.*;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// Uses Zip compression to compress any
|
||||
// number of files given on the command line
|
||||
// {java ZipCompress ZipCompress.java}
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.util.zip.*;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.stream.*;
|
||||
|
@ -3,7 +3,7 @@
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// Hidden deadlock
|
||||
// {ValidateByHand} Gradle has trouble
|
||||
// {ExcludeFromGradle} Gradle has trouble
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import onjava.Nap;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.util.*;
|
||||
import java.util.stream.*;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.io.IOException;
|
||||
import java.nio.file.*;
|
||||
import static java.nio.file.StandardWatchEventKinds.*;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.io.IOException;
|
||||
import java.nio.file.*;
|
||||
import static java.nio.file.StandardWatchEventKinds.*;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.io.*;
|
||||
|
||||
public class BasicFileOutput {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.io.*;
|
||||
import java.util.stream.*;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.io.*;
|
||||
|
||||
public class FileOutputShortcut {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.io.*;
|
||||
|
||||
public class FormattedMemoryInput {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.io.*;
|
||||
|
||||
public class MemoryInput {
|
||||
|
@ -3,7 +3,7 @@
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// Testing for end of file
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
import java.io.*;
|
||||
|
||||
public class TestEOF {
|
||||
|
@ -3,7 +3,7 @@
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// When threads collide
|
||||
// {ValidateByHand}
|
||||
// {VisuallyInspectOutput}
|
||||
|
||||
public class EvenProducer extends IntGenerator {
|
||||
private int currentEvenValue = 0;
|
||||
|
@ -2,7 +2,7 @@
|
||||
// (c)2017 MindView LLC: see Copyright.txt
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// {ValidateByHand} Takes a long time or hangs
|
||||
// {ExcludeFromGradle} Takes a long time or hangs
|
||||
import java.util.concurrent.*;
|
||||
import onjava.Nap;
|
||||
|
||||
|
@ -3,14 +3,16 @@
|
||||
// We make no guarantees that this code is fit for any purpose.
|
||||
// Visit http://OnJava8.com for more book information.
|
||||
// Accidental recursion
|
||||
// {ValidateByHand} Throws very long exception
|
||||
// {ThrowsException}
|
||||
// {VisuallyInspectOutput} Throws very long exception
|
||||
import java.util.*;
|
||||
import java.util.stream.*;
|
||||
|
||||
public class InfiniteRecursion {
|
||||
@Override
|
||||
public String toString() {
|
||||
return " InfiniteRecursion address: " + this + "\n";
|
||||
return
|
||||
" InfiniteRecursion address: " + this + "\n";
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
Stream.generate(InfiniteRecursion::new)
|
||||
|
Loading…
x
Reference in New Issue
Block a user