Skip to content

Commit

Permalink
Add yaml and patch files
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoultas committed Mar 15, 2022
1 parent 59ee2e2 commit 008c322
Show file tree
Hide file tree
Showing 6 changed files with 345 additions and 37 deletions.
87 changes: 87 additions & 0 deletions artifacts/configs/convex/convex.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
diff --git a/convex-core/pom.xml b/convex-core/pom.xml
index 471f81bf..3f83db91 100644
--- a/convex-core/pom.xml
+++ b/convex-core/pom.xml
@@ -32,6 +32,59 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.8.6</version>
+ <executions>
+ <execution>
+ <id>default-prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>jacoco-report</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.3.0</version>
+
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.2.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
<resources>
<resource>
@@ -44,6 +97,22 @@
</resources>
</build>

+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
14 changes: 14 additions & 0 deletions artifacts/configs/convex/convex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: convex
URL: https://github.com/Convex-Dev/convex.git
checkoutID: e6db05a611cd4a1fb51f959e20d246637bb7744a
patchName: artifacts/configs/convex/convex.patch
subProject: convex-core
#mvnOptions: -DfailIfNoTests=false -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
mvnOptions: -DfailIfNoTests=false
properties:
# - name: GenTestFormat#messageRoundTrip
# entryPoint: "convex.comms.GenTestFormat.messageRoundTrip(Ljava/lang/String;)V"
- name: GenTestFormat#primitiveRoundTrip
entryPoint: "convex.comms.GenTestFormat.primitiveRoundTrip(Lconvex/core/data/ACell;)V"
# - name: GenTestFormat#dataRoundTrip
# entryPoint: "convex.comms.GenTestFormat.dataRoundTrip(Lconvex/core/data/ACell;)V"
95 changes: 95 additions & 0 deletions artifacts/configs/jflex/jflex.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
diff --git a/jflex/pom.xml b/jflex/pom.xml
index 47904b61..185a3790 100644
--- a/jflex/pom.xml
+++ b/jflex/pom.xml
@@ -51,6 +51,21 @@
<timezone>+1</timezone>
</developer>
</developers>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
<dependencies>
<dependency>
<groupId>com.github.vbmacher</groupId>
@@ -156,6 +171,34 @@
</manifest>
</archive>
</configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.3.0</version>
+
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -231,6 +274,13 @@
</excludes>
</configuration>
</execution>
+ <execution>
+ <id>jacoco-report</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
</plugins>

diff --git a/jflex/src/test/java/jflex/state/StateSetQuickcheck.java b/jflex/src/test/java/jflex/state/StateSetQuickcheck.java
index c3ac7e67..35c34f32 100644
--- a/jflex/src/test/java/jflex/state/StateSetQuickcheck.java
+++ b/jflex/src/test/java/jflex/state/StateSetQuickcheck.java
@@ -165,6 +165,13 @@ public class StateSetQuickcheck {
assertThat(s).isNotEqualTo(sPre);
s.addState(e);
assertThat(s).isEqualTo(sPre);
+
+ // remove with add larger to force resize
+ s.remove(e);
+ assertThat(sPre.contains(s)).isTrue();
+ assertThat(s).isNotEqualTo(sPre);
+ s.addState(e + 384);
+ assertThat(s).contains(e + 384);
}

@Property

70 changes: 70 additions & 0 deletions artifacts/configs/jflex/jflex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: jflex
URL: https://github.com/jflex-de/jflex.git
checkoutID: e6d1752bd48a7ccb2a2b78479dc5a73ac475bbb9
patchName: artifacts/configs/jflex/jflex.patch
subProject: jflex
#mvnOptions: -DfailIfNoTests=false -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
mvnOptions: -DfailIfNoTests=false
properties:
# - name: StateSetQuickcheck#size2nbits
# entryPoint: "jflex.state.StateSetQuickcheck.size2nbits(I)V"
# - name: StateSetQuickcheck#containsIsSubset
# entryPoint: "jflex.state.StateSetQuickcheck.containsIsSubset(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#addIsUnion
# entryPoint: "jflex.state.StateSetQuickcheck.addIsUnion(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#addCommutes
# entryPoint: "jflex.state.StateSetQuickcheck.addCommutes(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#addEmpty
# entryPoint: "jflex.state.StateSetQuickcheck.addEmpty(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#addSelf
# entryPoint: "jflex.state.StateSetQuickcheck.addSelf(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#addIdemPotent
# entryPoint: "jflex.state.StateSetQuickcheck.addIdemPotent(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#intersect
# entryPoint: "jflex.state.StateSetQuickcheck.intersect(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#intersectUnchanged
# entryPoint: "jflex.state.StateSetQuickcheck.intersectUnchanged(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#intersectCommutes
# entryPoint: "jflex.state.StateSetQuickcheck.intersectCommutes(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#intersectEmpty
# entryPoint: "jflex.state.StateSetQuickcheck.intersectEmpty(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#intersectSelf
# entryPoint: "jflex.state.StateSetQuickcheck.intersectSelf(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#containsItsElements
# entryPoint: "jflex.state.StateSetQuickcheck.containsItsElements(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#removeRemoves
# entryPoint: "jflex.state.StateSetQuickcheck.removeRemoves(Ljflex/state/StateSet;I)V"
- name: StateSetQuickcheck#removeAdd
entryPoint: "jflex.state.StateSetQuickcheck.removeAdd(Ljflex/state/StateSet;I)V"
# - name: StateSetQuickcheck#clearMakesEmpty
# entryPoint: "jflex.state.StateSetQuickcheck.clearMakesEmpty(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#addStateAdds
# entryPoint: "jflex.state.StateSetQuickcheck.addStateAdds(Ljflex/state/StateSet;I)V"
# - name: StateSetQuickcheck#addStateDoesNotRemove
# entryPoint: "jflex.state.StateSetQuickcheck.addStateDoesNotRemove(Ljflex/state/StateSet;I)V"
# - name: StateSetQuickcheck#addStateAdd
# entryPoint: "jflex.state.StateSetQuickcheck.addStateAdd(Ljflex/state/StateSet;I)V"
# - name: StateSetQuickcheck#complementNoOriginalElements
# entryPoint: "jflex.state.StateSetQuickcheck.complementNoOriginalElements(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#complementElements
# entryPoint: "jflex.state.StateSetQuickcheck.complementElements(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#complementUnion
# entryPoint: "jflex.state.StateSetQuickcheck.complementUnion(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#containsElements
# entryPoint: "jflex.state.StateSetQuickcheck.containsElements(Ljflex/state/StateSet;I)V"
# - name: StateSetQuickcheck#containsNoElements
# entryPoint: "jflex.state.StateSetQuickcheck.containsNoElements(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#copy
# entryPoint: "jflex.state.StateSetQuickcheck.copy(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#copyInto
# entryPoint: "jflex.state.StateSetQuickcheck.copyInto(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#hashCode
# entryPoint: "jflex.state.StateSetQuickcheck.hashCode(Ljflex/state/StateSet;Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#getAndRemoveRemoves
# entryPoint: "jflex.state.StateSetQuickcheck.getAndRemoveRemoves(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#getAndRemoveIsElement
# entryPoint: "jflex.state.StateSetQuickcheck.getAndRemoveIsElement(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#getAndRemoveAdd
# entryPoint: "jflex.state.StateSetQuickcheck.getAndRemoveAdd(Ljflex/state/StateSet;)V"
# - name: StateSetQuickcheck#enumerator
# entryPoint: "jflex.state.StateSetQuickcheck.enumerator(Ljflex/state/StateSet;)V"
93 changes: 57 additions & 36 deletions artifacts/configs/mph-table/mph-table.patch
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ index 65f0f80..508b290 100644
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.3.0</version>
+
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.2.0</version>
+ <executions>
Expand Down Expand Up @@ -66,42 +87,42 @@ index 0000000..33b6870
--- /dev/null
+++ b/src/test/java/com/indeed/mph/generators/IntListGenerator.java
@@ -0,0 +1,36 @@
+package com.indeed.mph.generators;
+import com.pholser.junit.quickcheck.generator.ComponentizedGenerator;
+import com.pholser.junit.quickcheck.generator.GenerationStatus;
+import com.pholser.junit.quickcheck.random.SourceOfRandomness;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+public class IntListGenerator extends ComponentizedGenerator<List> {
+ public IntListGenerator() {
+ super(List.class);
+ }
+ boolean generatedEmptyList = false;
+ @Override
+ public List generate(SourceOfRandomness sourceOfRandomness, GenerationStatus generationStatus) {
+ if (!generatedEmptyList) {
+ generatedEmptyList = true;
+ return new ArrayList();
+ }
+ int rng = sourceOfRandomness.nextInt(0, 20);
+ int listSize = 0;
+ if (rng >= 0 && rng <= 16) {
+ listSize = sourceOfRandomness.nextInt(0, 100);
+ } else if (rng >= 17 && rng <= 18) {
+ listSize = sourceOfRandomness.nextInt(1000, 10000);
+ } else if (rng >= 19 && rng <= 20) {
+ listSize = sourceOfRandomness.nextInt(100000, 10000000);
+ }
+ return IntStream.range(0, listSize).mapToObj(i -> sourceOfRandomness.nextInt(Integer.MIN_VALUE, Integer.MAX_VALUE)).collect(Collectors.toList());
+ }
+ @Override
+ public int numberOfNeededComponents() {
+ return 1;
+ }
+}
+package com.indeed.mph.generators;
+import com.pholser.junit.quickcheck.generator.ComponentizedGenerator;
+import com.pholser.junit.quickcheck.generator.GenerationStatus;
+import com.pholser.junit.quickcheck.random.SourceOfRandomness;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+public class IntListGenerator extends ComponentizedGenerator<List> {
+ public IntListGenerator() {
+ super(List.class);
+ }
+ boolean generatedEmptyList = false;
+ @Override
+ public List generate(SourceOfRandomness sourceOfRandomness, GenerationStatus generationStatus) {
+ if (!generatedEmptyList) {
+ generatedEmptyList = true;
+ return new ArrayList();
+ }
+ int rng = sourceOfRandomness.nextInt(0, 20);
+ int listSize = 0;
+ if (rng >= 0 && rng <= 16) {
+ listSize = sourceOfRandomness.nextInt(0, 100);
+ } else if (rng >= 17 && rng <= 18) {
+ listSize = sourceOfRandomness.nextInt(1000, 10000);
+ } else if (rng >= 19 && rng <= 20) {
+ listSize = sourceOfRandomness.nextInt(100000, 10000000);
+ }
+ return IntStream.range(0, listSize).mapToObj(i -> sourceOfRandomness.nextInt(Integer.MIN_VALUE, Integer.MAX_VALUE)).collect(Collectors.toList());
+ }
+ @Override
+ public int numberOfNeededComponents() {
+ return 1;
+ }
+}
diff --git a/src/test/java/com/indeed/mph/serializers/TestSmartListSerializer.java b/src/test/java/com/indeed/mph/serializers/TestSmartListSerializer.java
index 8312fe2..e898509 100644
--- a/src/test/java/com/indeed/mph/serializers/TestSmartListSerializer.java
Expand Down
Loading

0 comments on commit 008c322

Please sign in to comment.