Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
ros2rag
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
ros2rag
Commits
effb5d3c
Commit
effb5d3c
authored
5 years ago
by
René Schöne
Browse files
Options
Downloads
Patches
Plain Diff
Ensure in RelastTest, that output directories are created.
parent
1542e409
No related branches found
No related tags found
No related merge requests found
Pipeline
#6552
failed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
buildSrc/src/main/java/org/jastadd/relast/plugin/RelastTest.java
+16
-1
16 additions, 1 deletion
...c/src/main/java/org/jastadd/relast/plugin/RelastTest.java
with
16 additions
and
1 deletion
buildSrc/src/main/java/org/jastadd/relast/plugin/RelastTest.java
+
16
−
1
View file @
effb5d3c
...
...
@@ -8,6 +8,9 @@ import org.gradle.api.tasks.SourceSet;
import
org.gradle.api.tasks.SourceSetContainer
;
import
org.gradle.api.tasks.TaskAction
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
@@ -165,7 +168,7 @@ public class RelastTest extends DefaultTask {
private
String
[]
genSuffixes
=
{
".ast"
,
".jadd"
,
"RefResolver.jadd"
,
"ResolverStubs.jrag"
,
"Serializer.jadd"
};
@TaskAction
void
runTest
()
{
void
runTest
()
throws
IOException
{
setGroup
(
"verification"
);
setDescription
(
"Runs a relast test"
);
Project
project
=
getProject
();
...
...
@@ -188,6 +191,9 @@ public class RelastTest extends DefaultTask {
deleteSpec
.
delete
(
Paths
.
get
(
getOutputDir
(),
getPackageName
()));
}
});
// create output directories, if not existing
createDirectory
(
Paths
.
get
(
getOutputDir
()));
createDirectory
(
Paths
.
get
(
getGrammarName
()).
getParent
());
if
(
isVerbose
())
{
System
.
out
.
println
(
"Pre processing, running relast"
);
}
...
...
@@ -261,4 +267,13 @@ public class RelastTest extends DefaultTask {
}
}
private
void
createDirectory
(
Path
path
)
throws
IOException
{
try
{
Files
.
createDirectories
(
path
);
}
catch
(
IOException
e
)
{
System
.
err
.
println
(
"Could not create output directory "
+
path
);
throw
e
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment