Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
cfbab31f
Commit
cfbab31f
authored
May 10, 2017
by
Travis Wellman
Committed by
Wouter van Oortmerssen
May 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up JavaTest.sh - quote paths, and less error-prone deletion (#4301)
parent
cb2481ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
JavaTest.sh
tests/JavaTest.sh
+14
-15
No files found.
tests/JavaTest.sh
View file @
cfbab31f
...
@@ -14,31 +14,30 @@
...
@@ -14,31 +14,30 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
set
-o
errexit
echo
Compile
then
run the Java test.
echo
Compile
then
run the Java test.
java
-version
java
-version
testdir
=
$(
readlink
-fn
`
dirname
$0
`
)
testdir
=
"
$(
readlink
-fn
"
$(
dirname
"
$0
"
)
"
)
"
thisdir
=
$(
readlink
-fn
`
pwd
`
)
targetdir
=
${
testdir
}
/target
targetdir
=
"
${
testdir
}
/target"
if
[[
"
$testdir
"
!=
"
$thisdir
"
]]
;
then
if
[[
-e
"
${
targetdir
}
"
]]
;
then
echo
error: must be run from inside the
${
testdir
}
directory
echo
"cleaning target"
echo
you ran it from
${
thisdir
}
rm
-rf
"
${
targetdir
}
"
exit
1
fi
fi
find ..
-type
f
-name
"*.class"
-exec
rm
{}
\;
mkdir
-v
"
${
targetdir
}
"
if
[[
-e
"
${
targetdir
}
"
]]
;
then
if
!
find
"
${
testdir
}
/../java"
-type
f
-name
"*.class"
-delete
;
then
echo
"
clean target"
echo
"
failed to clean .class files from java directory"
>
&2
rm
-rf
${
targetdir
}
exit
1
fi
fi
mkdir
${
targetdir
}
javac
-d
"
${
targetdir
}
"
-classpath
"
${
testdir
}
/../java:
${
testdir
}
:
${
testdir
}
/namespace_test"
"
${
testdir
}
/JavaTest.java"
javac
-d
${
targetdir
}
-classpath
${
testdir
}
/../java:
${
testdir
}
:
${
testdir
}
/namespace_test JavaTest.java
(
cd
"
${
testdir
}
"
&&
java
-classpath
"
${
targetdir
}
"
JavaTest
)
java
-classpath
${
targetdir
}
JavaTest
rm
-rf
${
targetdir
}
rm
-rf
"
${
targetdir
}
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment