From 529b3c231b0a3abfe1391be690eec41ccb8a01ae Mon Sep 17 00:00:00 2001 From: Frej Drejhammar Date: Wed, 28 Jul 2021 11:34:43 +0200 Subject: compiler: Remove duplicated directory name construction in test The variable Listings is equivalent to the already created TargetDir, so remove its definition and use TargetDir instead. --- lib/compiler/test/compile_SUITE.erl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/compiler/test/compile_SUITE.erl') diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl index c9495c3755..c03eb2ad5e 100644 --- a/lib/compiler/test/compile_SUITE.erl +++ b/lib/compiler/test/compile_SUITE.erl @@ -495,16 +495,15 @@ do_file_listings(DataDir, PrivDir, [File|Files]) -> do_listing(Simple, TargetDir, to_pp, ".P"), do_listing(Simple, TargetDir, to_exp, ".E"), do_listing(Simple, TargetDir, to_core0, ".core"), - Listings = filename:join(PrivDir, listings), - ok = file:delete(filename:join(Listings, File ++ ".core")), + ok = file:delete(filename:join(TargetDir, File ++ ".core")), do_listing(Simple, TargetDir, to_core, ".core"), do_listing(Simple, TargetDir, to_kernel, ".kernel"), do_listing(Simple, TargetDir, to_dis, ".dis"), %% Final clean up. lists:foreach(fun(F) -> ok = file:delete(F) end, - filelib:wildcard(filename:join(Listings, "*"))), - ok = file:del_dir(Listings), + filelib:wildcard(filename:join(TargetDir, "*"))), + ok = file:del_dir(TargetDir), do_file_listings(DataDir,PrivDir,Files). -- cgit v1.2.1