Skip to content

Commit

Permalink
[irods#3988][irods#4009][irods#4013] test cases for three issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Kelly committed Jul 17, 2018
1 parent 9fbfc71 commit db4dc64
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
3 changes: 0 additions & 3 deletions lib/core/include/irods_path_recursion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ namespace irods
// exporting this env variable will actually allow the scantime result to be printed
static const char *chrono_env = "IRODS_SCAN_TIME";

// exporting this env variable will squelch the new progress text
static const char *displaypreflight_env = "IRODS_PREFLIGHT_VERBOSE";

class scantime
{
public:
Expand Down
20 changes: 9 additions & 11 deletions lib/core/src/irods_path_recursion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ irods::is_path_valid_for_recursion( boost::filesystem::path const & userpath,
}
else if (fs::is_directory( resolved ))
{
try {
// Adds the path to the usermap, if it's not there yet.
// Throws an irods::exception if a loop is found (there is
// already an instance of the path in usermap).
check_for_filesystem_loop(resolved, userpath, usermap);
} catch ( const irods::exception & _e ) {
try {
// Adds the path to the usermap, if it's not there yet.
// Throws an irods::exception if a loop is found (there is
// already an instance of the path in usermap).
check_for_filesystem_loop(resolved, userpath, usermap);
} catch ( const irods::exception & _e ) {
return false;
}

Expand Down Expand Up @@ -300,8 +300,6 @@ irods::file_system_sanity_check( irods::recursion_map_t& pathmap,
}

#define DISPLAY_PREFLIGHT true
// #define DISPLAY_PREFLIGHT getenv(irods::displaypreflight_env)
// #define DISPLAY_PREFLIGHT false

if (dirvec.size() > 0)
{
Expand All @@ -324,14 +322,14 @@ irods::file_system_sanity_check( irods::recursion_map_t& pathmap,
return USER_INPUT_OPTION_ERR;
}

if (DISPLAY_PREFLIGHT) { std::cout << "Running sanity check... " << std::flush; }
if (DISPLAY_PREFLIGHT) { std::cout << "Running recursive pre-scan... " << std::flush; }

if ((status = irods::scan_all_source_directories_for_loops(pathmap,
dirvec,
(rodsArgs->link == True? true: false))) < 0)
{
if (DISPLAY_PREFLIGHT) {
std::cout << "pre-flight complete... errors found.\n" << std::flush;
std::cout << "pre-scan complete... errors found.\n" << std::flush;
std::cout << "Aborting data transfer.\n" << std::flush;
}
if (getenv(irods::chrono_env)) {
Expand All @@ -340,7 +338,7 @@ irods::file_system_sanity_check( irods::recursion_map_t& pathmap,
return status;
}
if (DISPLAY_PREFLIGHT) {
std::cout << "pre-flight complete... " << std::flush;
std::cout << "pre-scan complete... " << std::flush;
std::cout << "transferring data...\n" << std::flush;
}
if (getenv(irods::chrono_env)) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/irods/test/test_symlink_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def test_iput_irsync_recursive_symlink_loop_to_self(self):
##################################
# Output on stdout should look like this:
#
# Running sanity check... pre-flight complete... errors found.
# Running recursive pre-scan... pre-scan complete... errors found.
# Aborting data transfer.
#
# Output on stderr should look like this:
Expand Down
2 changes: 1 addition & 1 deletion scripts/irods/test/ustrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Well known (usual) strings

def recurse_ok_string():
return 'Running sanity check... pre-flight complete... transferring data...'
return 'Running recursive pre-scan... pre-scan complete... transferring data...'

def recurse_fail_string():
return 'Aborting data transfer'
Expand Down

0 comments on commit db4dc64

Please sign in to comment.