-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
let long path file test support long test root directory
See gpr-issues#213
- Loading branch information
Showing
12 changed files
with
48 additions
and
23 deletions.
There are no files selected for viewing
4 changes: 0 additions & 4 deletions
4
...123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789/test1.gpr
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Can't find ALI file for /main.adb | ||
|
||
Can't find ALI file for /dst/dir_name/src1/test1.ads | ||
|
||
Can't find ALI file for /dst/dir_name/src2/test2.ads | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import os | ||
from e3.fs import mkdir, sync_tree | ||
from testsuite_support.builder_and_runner import BuilderAndRunner, GPRLS | ||
|
||
dest = 'dst' | ||
|
||
# return longest source file path if 'name' used as intermediate path | ||
def longest_path_length (name): | ||
return len(os.getcwd() + '/' + dest + '/' + name + '/src1/test1.ads') | ||
|
||
dir_name = 'a' | ||
|
||
while longest_path_length (dir_name) < 255 : | ||
dir_name = dir_name + 'a' | ||
|
||
src_path = os.path.join ('src_files') | ||
dest_path = os.path.join (dest, dir_name) | ||
|
||
mkdir(dest_path) | ||
sync_tree (src_path, dest_path) | ||
|
||
prj_gpr = open('prj.gpr', 'w') | ||
prj_gpr.write('with"' + dir_name + '/test1";project Prj is for Main use("main.adb");end Prj;') | ||
prj_gpr.close() | ||
|
||
test1_gpr = open(os.path.join (dest, dir_name, 'test1.gpr'), 'w') | ||
test1_gpr.write('with"' + dir_name + '/test2";project Test1 is for Source_Dirs use("src1");end Test1;') | ||
test1_gpr.close() | ||
|
||
p = BuilderAndRunner().run( | ||
[GPRLS, "-U", "-P", "prj.gpr"], | ||
env={"GPR_PROJECT_PATH": os.getcwd() + '/' + dest}, | ||
output='gprls.out', | ||
) | ||
|
||
for line in open('gprls.out'): | ||
print(line.replace(dir_name,'dir_name')) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
description: let a long relative path be imported from a 255 chars absolute path | ||
driver: python_script | ||
control: | ||
- [SKIP, "True", "uses gprls that is not built from gpr2-next"] |