Changeset 3846


Ignore:
Timestamp:
Sep 13, 2019, 2:11:23 PM (5 weeks ago)
Author:
Peter
Message:

avoid compiler warning about ignoring return value from chdir

Location:
trunk/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Suite.cc

    r3439 r3846  
    2727
    2828#include <algorithm>
     29#include <cerrno>
    2930#include <cmath>
    3031#include <cstdlib>
     32#include <cstring>
    3133#include <fstream>
    3234#include <iostream>
     
    5658    std::string test_dir = "test/testSubDir/" + utility::basename(argv[0]);
    5759    utility::mkdir_p(test_dir);
    58     chdir(test_dir.c_str());
     60    if (chdir(test_dir.c_str())) {
     61      err() << "error changing directory: " << test_dir
     62            << strerror(errno) << "\n";
     63      exit (EXIT_HARD_FAILURE);
     64    }
    5965    out() << "running '" << argv[0] << "' in '" << test_dir << "'\n";
    6066    // synchronize cerr and cout, i.e., cout is flushed before
  • trunk/test/Suite.h

    r3792 r3846  
    3535// used to tell automake that test should be skipped
    3636#define EXIT_SKIP 77
     37#define EXIT_HARD_FAILURE 99
    3738
    3839// SKIP_BAM_TEST is defined if we should skip bam tests
Note: See TracChangeset for help on using the changeset viewer.