From a0351558a7622ef9fa1e9158d06e16b719071742 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Thu, 15 Feb 2024 14:38:52 +0100 Subject: [PATCH] Substitute distutils in regression testing infrastructure --- test/prog/fortnet/bin/testwithworkdir | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/prog/fortnet/bin/testwithworkdir b/test/prog/fortnet/bin/testwithworkdir index 178aaaa..4a70987 100644 --- a/test/prog/fortnet/bin/testwithworkdir +++ b/test/prog/fortnet/bin/testwithworkdir @@ -17,9 +17,9 @@ reference files with the output of the current version of the program. import os +import shutil import subprocess import argparse -from distutils.dir_util import copy_tree from argparse import RawTextHelpFormatter import testwithworkdir as twd from testwithworkdir import TestWithWorkDirError @@ -45,8 +45,8 @@ def main(cmdlineargs=None): args = parse_cmdline_args(cmdlineargs) - copy_tree(os.path.join(args.templateroot, args.test), - os.path.join(args.workdir, args.test)) + shutil.copytree(os.path.join(args.templateroot, args.test), + os.path.join(args.workdir, args.test), dirs_exist_ok=True) cmd = args.prerun + ' ' + args.program cwd = os.path.join(args.workdir, args.test)