VirtualBox

source: vbox/trunk/src/VBox/Debugger/testcase/tstVBoxDbg.cpp@ 5999

Last change on this file since 5999 was 5999, checked in by vboxsync, 17 years ago

The Giant CDDL Dual-License Header Change.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/** @file
2 *
3 * VBox Debugger GUI, dummy testcase.
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#include <qapplication.h>
23#include <VBox/dbg.h>
24#include <VBox/vm.h>
25#include <VBox/err.h>
26#include <iprt/runtime.h>
27#include <VBox/log.h>
28#include <iprt/assert.h>
29#include <iprt/runtime.h>
30#include <iprt/semaphore.h>
31#include <iprt/stream.h>
32
33
34#define TESTCASE "tstVBoxDbg"
35
36
37int main(int argc, char **argv)
38{
39 int cErrors = 0; /* error count. */
40
41 RTR3Init();
42 RTPrintf(TESTCASE ": TESTING...\n");
43
44 /*
45 * Create empty VM.
46 */
47 PVM pVM;
48 int rc = VMR3Create(NULL, NULL, NULL, NULL, &pVM);
49 if (VBOX_SUCCESS(rc))
50 {
51 /*
52 * Instantiate the debugger GUI bits and run them.
53 */
54 QApplication App(argc, argv);
55// DBGGuiCreate(pVM, true, NULL);
56 App.exec();
57
58 /*
59 * Cleanup.
60 */
61 rc = VMR3Destroy(pVM);
62 if (!VBOX_SUCCESS(rc))
63 {
64 RTPrintf(TESTCASE ": error: failed to destroy vm! rc=%d\n", rc);
65 cErrors++;
66 }
67 }
68 else
69 {
70 RTPrintf(TESTCASE ": fatal error: failed to create vm! rc=%d\n", rc);
71 cErrors++;
72 }
73
74 /*
75 * Summay and exit.
76 */
77 if (!cErrors)
78 RTPrintf(TESTCASE ": SUCCESS\n");
79 else
80 RTPrintf(TESTCASE ": FAILURE - %d errors\n", cErrors);
81 return !!cErrors;
82}
83
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette