diff --git a/tools/get_pr_ut.py b/tools/get_pr_ut.py index b64033e6d0c0d168d44e923bbb11b3db654d91d8..ce1af24190c9f2f44c08e0816924672b1b78996f 100644 --- a/tools/get_pr_ut.py +++ b/tools/get_pr_ut.py @@ -77,12 +77,12 @@ class PRChecker(object): ut_list.append(ut.rstrip('\r\n')) if check_added_ut: - cmd = 'bash {}/tools/check_added_ut.sh'.format(PADDLE_ROOT) + cmd = 'bash {}/tools/check_added_ut.sh >/tmp/pre_ut 2>&1'.format( + PADDLE_ROOT) os.system(cmd) - - with open('{}/added_ut'.format(PADDLE_ROOT)) as utfile: - for ut in utfile: - ut_list.append(ut.rstrip('\r\n')) + with open('{}/added_ut'.format(PADDLE_ROOT)) as utfile: + for ut in utfile: + ut_list.append(ut.rstrip('\r\n')) return ' '.join(ut_list)