Skip to content

Commit

Permalink
Merge branch 'master' into pydatagen
Browse files Browse the repository at this point in the history
  • Loading branch information
psybers committed Aug 3, 2021
2 parents 44adf49 + bc07f65 commit f2e7d11
Show file tree
Hide file tree
Showing 16 changed files with 187 additions and 174 deletions.
38 changes: 28 additions & 10 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

<target name="-translate-protobuf" depends="-check-protobuf" unless="protobuf.uptodate">
<echo level="error" message="Translating Protocol Buffer files to Java" />
<apply executable="protoc" parallel="true">
<apply executable="protoc" parallel="true">
<arg value="--proto_path=${src.proto}" />
<arg value="--java_out=src/compiled-proto" />
<srcfile />
Expand Down Expand Up @@ -175,15 +175,18 @@
</delete>
</target>



<!-- test targets -->
<target name="test" depends="test-compiler,test-functions,test-datagen" description="Run all unit tests.">
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-datagen" depends="test-datagen-java,test-datagen-js,test-datagen-php" description="Run datagen unit tests.">
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-datagen-java" depends="-compile-tests" description="Run Java datagen unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -198,6 +201,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-datagen-js" depends="-compile-tests" description="Run JavaScript datagen unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -212,6 +216,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-datagen-php" depends="-compile-tests" description="Run PHP datagen unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -226,20 +231,22 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-compiler" depends="-compile-tests" description="Run all compiler unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
<batchtest>
<formatter type="plain" usefile="false" />
<fileset dir="build/tests">
<include name="boa/test/compiler/Test*.class" />
<include name="boa/test/compiler/Test*.class" />
<exclude name="**/*$*.class" />
</fileset>
</batchtest>
</junit>
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-lexer" depends="-compile-tests" description="Run lexer unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -253,6 +260,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-parser" depends="-compile-tests" description="Run parser unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -266,6 +274,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-typecheck" depends="-compile-tests" description="Run typechecker unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -279,6 +288,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-inhattr" depends="-compile-tests" description="Run inherited attribute unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -289,6 +299,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-codegen" depends="-compile-tests" description="Run code generation unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -299,6 +310,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-traversal" depends="-compile-tests" description="Run traversal unit tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -312,6 +324,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-program-analysis" depends="-compile-tests" description="Run program analysis programs.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -322,6 +335,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-knowngood" depends="-compile-tests" description="Run known good tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -332,6 +346,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-functions" depends="-compile-tests" description="Run intrinsic functions tests.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -346,6 +361,7 @@
<delete file="SecurityAuth.audit" />
<fail message="Test failure detected." if="test.failed" />
</target>

<target name="test-specific" depends="-compile-tests" description="Run a specific test case.">
<junit fork="yes" haltonfailure="no" failureproperty="test.failed">
<classpath refid="test.class.path" />
Expand All @@ -369,13 +385,8 @@
<delete dir="build/tests" />
</target>

<target name="python-to-boa" depends="-compile-tests" description="Convert Python code to Boa AST.">
<java classname="boa.test.datagen.PythonToBoa" fork="true" failonerror="true">
<classpath refid="test.class.path" />
<arg value="${python.code}" />
</java>
</target>

<!-- debug targets -->
<target name="java-to-boa" depends="-compile-tests" description="Convert Java code to Boa AST.">
<java classname="boa.test.datagen.java.JavaToBoa" fork="true" failonerror="true">
<classpath refid="test.class.path" />
Expand All @@ -390,6 +401,13 @@
</java>
</target>

<target name="python-to-boa" depends="-compile-tests" description="Convert Python code to Boa AST.">
<java classname="boa.test.datagen.PythonToBoa" fork="true" failonerror="true">
<classpath refid="test.class.path" />
<arg value="${python.code}" />
</java>
</target>


<!-- style checking -->
<target name="checkstyle">
Expand All @@ -415,7 +433,7 @@
<exclude name="**/boa/types/proto/" />
<exclude name="**/boa/types/Boa*" />
</patternset>
</fileset>
</fileset>
<zipgroupfileset includes="parse.python.jar" dir="lib"/>
<zipgroupfileset includes="customized.dltk.core.jar" dir="lib"/>
</jar>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package boa.datagen.util;
package boa.test.datagen;

import java.util.Iterator;
import java.util.List;
Expand Down
1 change: 0 additions & 1 deletion src/test/boa/test/datagen/TestSequenceFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import boa.datagen.BoaGenerator;
import boa.datagen.DefaultProperties;
import boa.datagen.util.FileIO;
import boa.datagen.util.ProtoMessageVisitor;
import boa.functions.BoaIntrinsics;
import boa.test.datagen.java.Java8BaseTest;
import boa.types.Ast.ASTRoot;
Expand Down
2 changes: 1 addition & 1 deletion src/test/boa/test/datagen/TestTypeFullyQualifiedName.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import com.google.protobuf.CodedInputStream;
import com.google.protobuf.Message;
import boa.datagen.util.ProtoMessageVisitor;

import boa.types.Ast.ASTRoot;
import boa.types.Ast.Declaration;
import boa.types.Ast.Expression;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// is preserved, and any changes are properly documented.
//

package boa.test.datagen;
package boa.test.datagen.java;

import java.util.ArrayList;
import java.util.Iterator;
Expand Down
2 changes: 1 addition & 1 deletion src/test/boa/test/datagen/java/DumpJava.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2017, Robert Dyer,
* Copyright 2017, Robert Dyer,
* and Bowling Green State University
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// is preserved, and any changes are properly documented.
//

package boa.test.datagen;
package boa.test.datagen.java;

/**
* SAX-style printer for outputting AST nodes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// is preserved, and any changes are properly documented.
//

package boa.test.datagen;
package boa.test.datagen.java;

import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.Comment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// is preserved, and any changes are properly documented.
//

package boa.test.datagen;
package boa.test.datagen.java;

/**
* Maintains an indentation string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// is preserved, and any changes are properly documented.
//

package boa.test.datagen;
package boa.test.datagen.java;

import java.io.OutputStream;
import java.io.PrintWriter;
Expand Down
Loading

0 comments on commit f2e7d11

Please sign in to comment.