Mercurial > trustbridge
annotate ui/tests/fakeinstaller.c @ 1081:edbf5e5e88f4
(issue118) Extend verify_binary to carry an open file
* binverify.c: Change result to a structure containing an open fptr
Use in Memory data for windows verification.
* mainwindow.cpp, selftest.c: Handle the returend structure
* binverifytest.cpp: Test for the exclusive read and update signature.
* listutil.c: Add optional fptr parameter to read_file
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 11 Sep 2014 12:05:24 +0200 |
parents | aee3eb10bbba |
children | 2a1aa9df8f11 |
rev | line source |
---|---|
563
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
3 |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=2) |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
6 * See LICENSE.txt for details. */ |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
7 |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 /**@file dummy program to test installer execution */ |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
9 |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 #include <stdio.h> |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
11 #ifdef WIN32 |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
12 #include <windows.h> |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
13 #endif |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
15 int main() { |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
16 |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
17 int i = 0; |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 #ifdef WIN32 |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
19 OutputDebugStringA("Fakeinstaller started."); |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 #else |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
21 printf("Fakeinstaller started\n"); |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
22 #endif |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
23 for (; i < 0x0fffffff; i++); |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
24 |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
25 return 0; |
aee3eb10bbba
Add unit test for sw update execution and fix shell execute params
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 } |