Skip to content

Commit

Permalink
forge tester: move implementation packages to +internal
Browse files Browse the repository at this point in the history
  • Loading branch information
apjanke committed Mar 16, 2019
1 parent b9daf26 commit 328066e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
methods
function this = ForgePkgTester
if ispc
this.known_bad_pkgs_test = testify.ForgePkgTester.known_bad_pkgs_test_windows;
this.known_bad_pkgs_test = testify.internal.ForgePkgTester.known_bad_pkgs_test_windows;
elseif ismac
this.known_bad_pkgs_test = testify.ForgePkgTester.known_bad_pkgs_test_mac;
this.known_bad_pkgs_test = testify.internal.ForgePkgTester.known_bad_pkgs_test_mac;
else
this.known_bad_pkgs_test = testify.ForgePkgTester.known_bad_pkgs_test_linux;
this.known_bad_pkgs_test = testify.internal.ForgePkgTester.known_bad_pkgs_test_linux;
endif
timestamp = datestr(now, 'yyyy-mm-dd_HH-MM-SS');
tmp_dir_name = ['octave-testify-ForgePkgTester-' timestamp];
Expand All @@ -54,13 +54,13 @@
this.tmp_dir = fullfile (group_tmp_dir, tmp_dir_name);
this.build_log_dir = fullfile (this.tmp_dir, 'build-logs');
this.tmp_run_dir = fullfile (tempdir, [tmp_dir_name '-run']);
this.pkgtool = testify.ForgePkgTool;
this.pkgtool = testify.internal.ForgePkgTool;
endfunction

function install_and_test_all_forge_pkgs (this)
mkdir (this.tmp_dir);
mkdir (this.build_log_dir);
if isempty (this.pkgs_to_test)
if isempty (this.pkgs_to_test)
qualifier = 'all';
forge_pkgs = pkg ('-forge', 'list');
this.pkgs_to_test = setdiff (forge_pkgs, this.known_bad_pkgs_install);
Expand Down Expand Up @@ -94,7 +94,7 @@ function install_and_test_all_forge_pkgs (this)
% Display log file again at end so it's easy to find when test run finishes
fprintf ('Log file: %s\n', log_file);
fprintf ('\n');
end_unwind_protect
end_unwind_protect
endfunction

function out = find_file_droppings (this)
Expand Down Expand Up @@ -169,7 +169,7 @@ function install_and_test_all_forge_pkgs (this)
try
say ('Installing Forge package %s', pkg_name);
flush_diary
installer = testify.ForgePkgInstaller;
installer = testify.internal.ForgePkgInstaller;
t0 = tic;
rslt = installer.install (pkg_name);
te = toc (t0);
Expand Down Expand Up @@ -207,9 +207,9 @@ function install_and_test_all_forge_pkgs (this)
this.test_failures{end+1} = pkg_name;
endif
catch err
say ('Error while testing package %s: %s', ...
pkg_name, err.message);
this.test_failures{end+1} = pkg_name;
say ('Error while testing package %s: %s', ...
pkg_name, err.message);
this.test_failures{end+1} = pkg_name;
return;
end_try_catch
flush_diary
Expand All @@ -229,7 +229,7 @@ function display_log_header (this)
endif
fprintf ('\n');
fprintf ('Environment Variables:\n');
env_var_displayer = testify.EnvVarDisplayer;
env_var_displayer = testify.internal.EnvVarDisplayer;
env_var_displayer.display_redacted_env_vars;
fprintf ('\n');
if isunix
Expand Down Expand Up @@ -278,10 +278,10 @@ function print_pkgs_one_per_line (pkg_names)
fprintf ('\n');
endif
endif
if isempty (this.test_failures)
fprintf ('All packages passed tests OK.\n');
else
fprintf ('Failed package tests:\n');
if isempty (this.test_failures)
fprintf ('All packages passed tests OK.\n');
else
fprintf ('Failed package tests:\n');
print_pkgs_one_per_line (this.test_failures);
endif
fprintf ('\n');
Expand All @@ -290,7 +290,7 @@ function print_pkgs_one_per_line (pkg_names)
print_pkgs_one_per_line (this.error_pkgs);
fprintf ('\n');
endif
endfunction
endfunction
endmethods

endclassdef
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion inst/+testify/install_and_test_all_forge_pkgs.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

function install_and_test_all_forge_pkgs (pkgs_to_test)
if nargin < 1; pkgs_to_test = {}; endif
pkgtester = testify.ForgePkgTester;
pkgtester = testify.internal.ForgePkgTester;
if ~isempty (pkgs_to_test)
pkgtester.pkgs_to_test = pkgs_to_test;
endif
Expand Down

0 comments on commit 328066e

Please sign in to comment.