Skip to content

Commit b1d9e92

Browse files
committed
Use dedicated working directory for test
1 parent f07cefc commit b1d9e92

14 files changed

Lines changed: 207 additions & 270 deletions

.github/workflows/CI.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ jobs:
9999
cat build/Testing/Temporary/LastTest.log
100100
echo "::endgroup::"
101101
exit $ExitCode
102-
- name: Run remove test
103-
if: always()
104-
run: ./scripts/run_test_remove.sh
105102
- name: Run performance test
106103
if: always()
107104
run: ./scripts/run_test_performance.sh 2>&1 | tee performance.txt

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"mklink",
2323
"msys",
2424
"noncode",
25+
"pushd",
2526
"STREQUAL",
2627
"venv",
2728
"windres"

scripts/run_test_performance.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function append_rsp() {
1717

1818
if [ $index -le $max ] ; then
1919
echo "$current_dir " >> mkdir.rsp
20-
for i in $(seq 1 $max); do
20+
for i in $(seq 1 $max); do
2121
echo "$current_dir/f$i " >> touch.rsp
2222
done
2323
append_rsp $current_dir/$index "$(($index + 1))"
@@ -31,10 +31,25 @@ time append_rsp root 0
3131
echo """Lists contain $(wc --lines < mkdir.rsp) directories and $(wc --lines < touch.rsp) files.
3232
Longest filename has $(wc --max-line-length < touch.rsp) characters.
3333
"""
34+
sed --regexp-extended -s 's|/|\\\\|g' < mkdir.rsp > mkdir.backslash.rsp
35+
sed --regexp-extended -s 's|/|\\\\|g' < touch.rsp > touch.backslash.rsp
3436

3537
###############################################################################
3638
echo """
37-
### Using bash
39+
### Using cmd
40+
41+
#### Creating directories"""
42+
time xargs --max-chars=8000 --arg-file mkdir.backslash.rsp -I '{}' cmd.exe //c "mkdir {}" \;
43+
echo "
44+
#### Creating files"
45+
time xargs --max-chars=8000 --arg-file touch.backslash.rsp -I '{}' cmd.exe //c "for %f in ( {} ) do @( echo. > %f )" \;
46+
echo "
47+
#### Removing tree"
48+
time rm -rf root
49+
50+
###############################################################################
51+
echo """
52+
### Using bash
3853
3954
#### Creating directories"""
4055
time xargs --max-chars=8000 --arg-file mkdir.rsp mkdir
@@ -60,7 +75,7 @@ time FileOp.exe remove --recursive --force root
6075

6176
###############################################################################
6277
echo """
63-
### Using FileOp with rsp
78+
### Using FileOp with rsp
6479
6580
#### Creating directories"""
6681
time FileOp.exe mkdir @mkdir.rsp

scripts/run_test_remove.sh

Lines changed: 0 additions & 128 deletions
This file was deleted.

src/BasicFileOp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
LPCTSTR DosDevicePathPrefix = _T("\\\\?\\");
1717
// The length of the DOS device path prefix
1818
const int DOS_DEVICE_PREFIX_LENGTH = sizeof(DosDevicePathPrefix) / sizeof(TCHAR);
19+
//! The prefix for a DOS device path prefix for UNC paths
1920
LPCTSTR DosDevicePathPrefixUnc = _T("\\\\?\\UNC\\");
2021
// The length of the DOS device path prefix for UNC paths
2122
const int DOS_DEVICE_PREFIX_UNC_LENGTH = sizeof(DosDevicePathPrefixUnc) / sizeof(TCHAR);

0 commit comments

Comments
 (0)