* cygrun.c: Move from here to ../testsuite.

* Makefile.in: Remove cygrun.exe dependencies.
This commit is contained in:
Corinna Vinschen 2003-01-22 15:23:23 +00:00
parent 19876644c7
commit 2037688a5d
3 changed files with 6 additions and 75 deletions

View File

@ -1,3 +1,8 @@
2003-01-22 Corinna Vinschen <corinna@vinschen.de>
* cygrun.c: Move from here to ../testsuite.
* Makefile.in: Remove cygrun.exe dependencies.
2003-01-21 Jason Tishler <jason@tishler.net>
* cygwin.din: Export nanosleep().

View File

@ -194,7 +194,7 @@ all: all_target $(all_host)
all_target: $(TARGET_LIBS) cygserver.exe
all_host: new-$(LIB_NAME) cygrun.exe
all_host: new-$(LIB_NAME)
force:
@ -340,13 +340,6 @@ winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
$(COMPILE_CXX) -o version.o version.cc && \
touch $@
cygrun.o: cygrun.c
$(CC) $(MINGW_CFLAGS) -o $@ -c $<
cygrun.exe : cygrun.o -lgcc $(w32api_lib)/libuser32.a \
$(w32api_lib)/libshell32.a $(w32api_lib)/libkernel32.a
$(CC) ${MINGW_LDFLAGS} -mno-cygwin -o $@ $^
cygserver_transport_outside.o: cygserver_transport.cc
$(COMPILE_CXX) -D__OUTSIDE_CYGWIN__ -o $@ $<

View File

@ -1,67 +0,0 @@
/* cygrun.c: testsuite support program
Copyright 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
/* This program is intended to be used only by the testsuite. It runs
programs without using the cygwin api, so that the just-built dll
can be tested without interference from the currently installed
dll. */
#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
int
main (int argc, char **argv)
{
STARTUPINFO sa;
PROCESS_INFORMATION pi;
DWORD ec = 1;
char *p;
if (argc < 2)
{
fprintf (stderr, "Usage: cygrun [program]\n");
exit (0);
}
SetEnvironmentVariable ("CYGWIN_TESTING", "1");
if ((p = getenv ("CYGWIN")) == NULL || (strstr (p, "ntsec") == NULL))
{
char buf[4096];
if (!p)
{
p = buf;
p[0] = '\0';
}
else
{
strcpy (buf, p);
strcat (buf, " ");
}
strcat(buf, "ntsec");
SetEnvironmentVariable ("CYGWIN", buf);
}
memset (&sa, 0, sizeof (sa));
memset (&pi, 0, sizeof (pi));
if (!CreateProcess (0, argv[1], 0, 0, 1, 0, 0, 0, &sa, &pi))
{
fprintf (stderr, "CreateProcess %s failed\n", argv[1]);
exit (1);
}
WaitForSingleObject (pi.hProcess, INFINITE);
GetExitCodeProcess (pi.hProcess, &ec);
CloseHandle (pi.hProcess);
CloseHandle (pi.hThread);
return ec;
}