Skip to content

Commit 4e586a2

Browse files
committed
[GR-14716] Pkgtest: Fix default test file status.
PullRequest: fastr/1981
2 parents 661db39 + 6a678e7 commit 4e586a2

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

com.oracle.truffle.r.test.packages/pkgtest/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,15 @@ class TestFileStatus:
317317
def __init__(self, status, abspath):
318318
self.status = status
319319
self.abspath = abspath
320-
self.report = 0, 1, 0
320+
if status == "OK":
321+
# At this point, status == "OK" means that we had no '.fail' output file and we will investigate the single
322+
# test cases. So, initially we claim the test was skipped because if GnuR failed on the test, we state that
323+
# we skipped it.
324+
self.report = 0, 1, 0
325+
elif status == "FAILED":
326+
self.report = 0, 0, 1
327+
else:
328+
raise ValueError('Invalid test file status: %s (allowed: "OK", "FAILED")' % status)
321329

322330

323331
class TestStatus:

com.oracle.truffle.r.test.packages/r/install.cache.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,11 +719,11 @@ pkg.cache.full.install <- function(install.candidate.names, contriburl, lib.inst
719719

720720
# override packages need to be installed differently
721721
if (length(pkgs.in.overrides) > 0) {
722-
install.fastr.packages(as.character(pkgs.in.overrides), lib=lib.install, INSTALL_opts="--install-tests")
722+
install.fastr.packages(as.character(pkgs.in.overrides), lib=lib.install, INSTALL_opts="--install-tests --no-clean-on-error")
723723
}
724724

725725
if (length(pkgs.not.in.overrides) > 0) {
726-
install.packages(as.character(pkgs.not.in.overrides), contriburl=contriburl, type="source", lib=lib.install, INSTALL_opts="--install-tests")
726+
install.packages(as.character(pkgs.not.in.overrides), contriburl=contriburl, type="source", lib=lib.install, INSTALL_opts="--install-tests --no-clean-on-error")
727727
}
728728
}
729729

0 commit comments

Comments
 (0)