Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
7e9fa27
testing new travis settings
hyttijan Oct 3, 2017
cf9b098
new try
hyttijan Oct 3, 2017
fe34647
new try2
hyttijan Oct 3, 2017
dd51c17
new try3
hyttijan Oct 3, 2017
480ad0d
new try4
hyttijan Oct 3, 2017
f786296
new try5
hyttijan Oct 3, 2017
8632570
new try6
hyttijan Oct 3, 2017
0cc6d7d
new try7
hyttijan Oct 3, 2017
02e9691
new try8
hyttijan Oct 3, 2017
f0dfc20
new try9
hyttijan Oct 3, 2017
f42f898
new try10
hyttijan Oct 3, 2017
319eb1a
new try11
hyttijan Oct 3, 2017
61c93a8
new try12
hyttijan Oct 3, 2017
d4e57c4
new try13
hyttijan Oct 3, 2017
ab73766
new try14
hyttijan Oct 3, 2017
759fa7d
new try15
hyttijan Oct 3, 2017
f957cda
new try16
hyttijan Oct 3, 2017
547cf71
new try17
hyttijan Oct 3, 2017
ce4631c
new try18
hyttijan Oct 3, 2017
a01a35e
new try19
hyttijan Oct 3, 2017
8bf59b7
puskii
hyttijan Oct 3, 2017
4a382aa
new try20
hyttijan Oct 3, 2017
e6f0b3b
zzz
hyttijan Oct 3, 2017
9e0d8f2
zzzz
hyttijan Oct 3, 2017
51a5fdf
zzzzz
hyttijan Oct 3, 2017
14fc5da
zzzzzz
hyttijan Oct 3, 2017
33b6c52
asd
hyttijan Oct 3, 2017
727c4d0
new try
hyttijan Oct 3, 2017
124d631
new try2
hyttijan Oct 3, 2017
387d9bd
new try2
hyttijan Oct 3, 2017
d5dfb39
new try
hyttijan Oct 3, 2017
d9e3fb7
new try
hyttijan Oct 3, 2017
708f7c5
new try2
hyttijan Oct 3, 2017
51232eb
new try
hyttijan Oct 3, 2017
f142f5d
Trying to install newer R version on travis.
anttihaap Oct 4, 2017
82d3ab0
Travis fix: removed chmod from .travis.yml since file is not found.
anttihaap Oct 4, 2017
e4fc8be
Travis fix: changing permission for /usr/local/lib/R/site-library
anttihaap Oct 4, 2017
3cbcdc0
Travis fix: changing permission for /usr/local/lib/R/site-library now…
anttihaap Oct 4, 2017
9629e5e
runTests.sh uses run_tests function
anttihaap Oct 4, 2017
4cba962
Updated RTestResultParser to use new .results.json format.
anttihaap Oct 4, 2017
e28e5c4
Added forgotten .results.json and changed TestMain to prev version.
anttihaap Oct 4, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ env:
- M3_HOME=/usr/local/maven

before_install:
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
- echo "deb https://cloud.r-project.org/bin/linux/ubuntu trusty/" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -qq
- sudo apt-get install r-base -y
- sudo chmod 277 /usr/local/lib/R/site-library
- Rscript -e 'install.packages(c("devtools","testthat"),repos="http://cran.us.r-project.org")'
- Rscript -e 'devtools::install_github("RTMC/tmc-r-tester/tmcRtestrunner")'
- export PATH=$PATH:$PWD/bin
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
- mkdir -p $HOME/bin && ln -s $(which python3.4) $HOME/bin/python3 && export PATH="$HOME/bin:$PATH"
- mvn install -Dmaven.test.skip=true

script:
- mvn clean test -pl tmc-langs-r
- mvn checkstyle:check
Expand All @@ -36,6 +44,7 @@ jdk:
- oraclejdk7
- openjdk7
matrix:

allow_failures:
- os: osx
- jdk: oraclejdk7
2 changes: 1 addition & 1 deletion tmc-langs-r/runTests.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
#Currently this script needs to be run at project root!
/usr/bin/Rscript -e "library(tmcRtestrunner);runTestsWithDefault(TRUE)"
/usr/bin/Rscript -e "library(tmcRtestrunner);run_tests()"
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public String[] getTestCommand() {
String[] command;
if (SystemUtils.IS_OS_WINDOWS) {
rscr = new String[] {"Rscript", "-e"};
command = new String[] {"\"library('tmcRtestrunner');runTestsWithDefault(TRUE)\""};
command = new String[] {"\"library('tmcRtestrunner');run_tests_with_default(TRUE)\""};
} else {
rscr = new String[] {"bash"};
command = new String[] {Paths.get("").toAbsolutePath().toString() + "/runTests.sh"};
Expand All @@ -163,7 +163,7 @@ public String[] getAvailablePointsCommand() {
if (SystemUtils.IS_OS_WINDOWS) {
rscr = new String[] {"Rscript", "-e"};
command = new String[] {"\"library(tmcRtestrunner);"
+ "get_available_points(\"$PWD\")\""};
+ "run_available_points(\"$PWD\")\""};
} else {
rscr = new String[] {"bash"};
command = new String[] {Paths.get("").toAbsolutePath().toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private List<TestResult> getTestResults() throws IOException {

List<TestResult> results = new ArrayList<>();

JsonNode tree = mapper.readTree(json);
JsonNode tree = mapper.readTree(json).get("testResults");
for (JsonNode node : tree) {
results.add(toTestResult(node));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void tearDown() {
public void testGetTestCommand() {
if (SystemUtils.IS_OS_WINDOWS) {
String[] expectedCommand = new String[]{"Rscript", "-e",
"\"library('tmcRtestrunner');runTestsWithDefault(TRUE)\""};
"\"library('tmcRtestrunner');run_tests_with_default(TRUE)\""};

Assert.assertArrayEquals(expectedCommand,plugin.getTestCommand());
} else if (SystemUtils.IS_OS_LINUX) {
Expand Down Expand Up @@ -70,9 +70,7 @@ public void testGetAvailablePointsCommand() {
public void testGetPluginName() {
assertEquals("r", plugin.getLanguageName());
}
/**
* Need to configure .travis.yml for these tests to work


@Test
public void testScanExercise() {
Path testDir = TestUtils.getPath(getClass(), "passing");
Expand All @@ -87,7 +85,7 @@ public void testRunTests() {

assertTrue(resultsJson.exists());
}
*/

@Test
public void excerciseIsCorrectTypeIfItContainsRFolder() {
Path testCasesRoot = TestUtils.getPath(getClass(), "recognition_test_cases");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void testThatParseSeemsToWorkOnExampleJson() {
for (TestResult tr : rr.testResults) {
if (tr.getName().equals("Addition works")) {
assertTrue(tr.isSuccessful());
assertEquals(2, tr.points.size());
assertEquals(3, tr.points.size());
assertTrue(tr.points.contains("r1.1"));
assertTrue(tr.points.contains("r1.2"));
}
Expand Down
Loading