Changeset 970
- Timestamp:
- Aug 11, 2011, 11:00:15 PM (14 years ago)
- Location:
- tests/process
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/process/child/child.c
r924 r970 27 27 int n; 28 28 FILE *fp; 29 char buffer[ 4096];29 char buffer[6]; 30 30 31 31 #ifdef __OS2__ -
tests/process/process-sync/process-sync-test.cmd
r925 r970 5 5 '@echo n >> n' 6 6 7 do i = 1 to 100 8 /* run */ 9 '@del bigfile.txt.out 1>nul 2>nul' 10 'process-sync.exe write bigfile.txt' 11 /* compare results */ 12 'comp bigfile.txt bigfile.txt.out < n' 13 if (rc \= 0) then do 14 say 'ERROR: rc = 'rc' (i = 'i')' 15 signal done 16 end 17 end 7 n_cycles = 100 18 8 19 do i = 1 to 100 20 /* run */ 21 '@del bigfile.txt.out 1>nul 2>nul' 22 'process-sync.exe read_out bigfile.txt' 23 /* compare results */ 24 'comp bigfile.txt bigfile.txt.out < n' 25 if (rc \= 0) then do 26 say 'ERROR: rc = 'rc' (i = 'i')' 27 signal done 28 end 29 end 9 do j = 1 to 2 10 if (j == 1) then gui = '' 11 else gui = 'gui' 30 12 31 do i = 1 to 100 32 /* run */ 33 '@del bigfile.txt.err 1>nul 2>nul' 34 'process-sync.exe read_err bigfile.txt' 35 /* compare results */ 36 'comp bigfile.txt bigfile.txt.err < n' 37 if (rc \= 0) then do 38 say 'ERROR: rc = 'rc' (i = 'i')' 39 signal done 40 end 13 do i = 1 to n_cycles 14 /* run */ 15 '@del bigfile.txt.out 1>nul 2>nul' 16 'process-sync.exe write bigfile.txt' gui 17 /* compare results */ 18 'comp bigfile.txt bigfile.txt.out < n' 19 if (rc \= 0) then do 20 say 'ERROR: rc = 'rc' (i = 'i')' 21 signal done 22 end 23 end 24 25 do i = 1 to n_cycles 26 /* run */ 27 '@del bigfile.txt.out 1>nul 2>nul' 28 'process-sync.exe read_out bigfile.txt' gui 29 /* compare results */ 30 'comp bigfile.txt bigfile.txt.out < n' 31 if (rc \= 0) then do 32 say 'ERROR: rc = 'rc' (i = 'i')' 33 signal done 34 end 35 end 36 37 do i = 1 to n_cycles 38 /* run */ 39 '@del bigfile.txt.err 1>nul 2>nul' 40 'process-sync.exe read_err bigfile.txt' gui 41 /* compare results */ 42 'comp bigfile.txt bigfile.txt.err < n' 43 if (rc \= 0) then do 44 say 'ERROR: rc = 'rc' (i = 'i')' 45 signal done 46 end 47 end 41 48 end 42 49 -
tests/process/process-sync/process-sync.cpp
r925 r970 8 8 #include <QFile> 9 9 #include <QProcess> 10 10 11 11 12 int test_write(const QString &aFile) … … 31 32 { 32 33 //QByteArray ba = f.read (2048); 33 QByteArray ba = f.read (32768); 34 //QByteArray ba = f.read (32768); 35 QByteArray ba = f.read (65536); 34 36 35 37 p.write (ba); … … 80 82 if (p.waitForStarted()) 81 83 { 82 while (p.waitForReadyRead() )84 while (p.waitForReadyRead()) 83 85 { 84 86 QByteArray ba = p.read (p.bytesAvailable()); … … 210 212 int main( int argc, char *argv[] ) 211 213 { 212 if (argc == 3) 213 { 214 if (argc >= 3) 215 { 216 QScopedPointer <QApplication> app; 217 if (argc == 4 && qstrcmp (argv [3], "gui") == 0) 218 app.reset (new QApplication (argc, argv)); 219 214 220 if (qstrcmp (argv [1], "read_out") == 0) 215 221 return test_read (QLatin1String (argv [2]), false); -
tests/process/process-sync/process-sync.pro
r926 r970 2 2 include(../$$DEPTH/common.pri) 3 3 4 QT = core 4 QT = core 5 5 6 6 SOURCES = process-sync.cpp
Note:
See TracChangeset
for help on using the changeset viewer.