Commit Graph
90 Commits
Author SHA1 Message Date
Miguel de Icaza c6ab899595 [System] Fix most warnings on the System test suite 2014-09-24 10:43:46 -04:00
Alexander Köplinger d77664ceb0 [System] Add performanceCounters element to System.Diagnostics app.config configuration section
See http://msdn.microsoft.com/en-us/library/ms229387(v=vs.110).aspx for details about the element.
The value that is set by the element isn't currently used in Mono, but applications using it in their app.config crash otherwise (e.g. http://stackoverflow.com/questions/25741651).
2014-09-14 07:45:11 +02:00
Sebastien Pouliot 90bb9c6d00 [System] Fix building unit tests under the mobile profile 2014-09-11 20:43:21 -04:00
Marek Safar 1eb9ba45c4 [system] Fixes failing test 2014-09-11 10:31:26 +02:00
Alexander Köplinger 29abf6790d [System] Fixed Diagnostics.Switch ctor behavior for null parameters
Passing null to the displayName or description ctor parameter on MS.NET makes them equal to an empty string.
Fixed the Mono behavior to match .NET.
2014-09-10 19:09:34 +02:00
Alexander Köplinger 0537cb3c2a Fix the build 2014-09-10 14:26:36 +02:00
ramtin 6cb9a04fca Unit Tests for SourceSwitch. Counting the number of events traced based on the Trace Level 2014-09-09 15:07:14 -07:00
Rodrigo Kumpera 1531d4f34d [System] Throw IOE in more cases when dealing with an invalid Process object. Fixes #19864 2014-05-16 16:30:56 -04:00
Alexander Köplinger b0032294da [Test] Cleaned up how a bunch of tests were ignored
Previously, many tests just had a return statement when the test shouldn't
be executed (e.g. Unix-only). This made it look like the test was successful
when in fact it wasn't executed at all.
Assert.Ignore() is now used instead to correctly exclude those tests.
2014-02-23 19:44:21 +01:00
Marek Safar ff876e0389 Fix TraceSource constructor. Fixes #12001 2013-05-09 14:52:36 +02:00
Zoltan Varga c94730c32f Disable some System tests which are expected to fail in the mobile profile. 2013-04-11 16:37:02 +02:00
Marek Safar aff6d0592c Mobile tests update 2013-02-26 17:17:22 +01:00
Marek Safar f0ad346fb6 Mobile tests update 2013-02-22 21:41:19 +01:00
Marek Safar aab6b9a30b Move System tests to System assembly 2012-04-05 15:46:26 +01:00
Marek Safar 510a2941c4 Move ConcurrentBag tests to System assembly 2012-02-10 14:56:23 +00:00
Atsushi Eno c860fd7dd4 Fix wrapper elements. It should be <TraceData><DataItem>... 2011-04-21 21:08:36 +09:00
Atsushi Eno 38050ff69b XmlWriterTraceListener supports XPathNavigator as non-escaped xml output. 2011-04-21 20:54:40 +09:00
Zoltan Varga 1c65751376 Call BeginErrorReadLine()/BeginOutputReadLine() in a Process test so it runs on windows too. 2010-08-09 19:43:38 +02:00
Zoltan Varga 2072ecbf4f Avoid printing the output of /bin/ls in a Process test. 2010-08-09 18:29:01 +02:00
Raja R Harinath cd51491631 Fix a few cases of mixed line-endings
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller.  I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
2010-07-26 02:20:13 +05:30
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Robert Jordan d7a6be8251 2009-06-26 Robert Jordan <[email protected]>
* SwitchesTest.cs, TraceTest.cs: Upgrade to new NUnit style.


svn path=/trunk/mcs/; revision=136951
2009-06-26 12:34:15 +00:00
Andrés G. Aragoneses eeb713067a changelog..
svn path=/trunk/mcs/; revision=127933
2009-02-25 02:33:30 +00:00
Andrés G. Aragoneses 5bb70a1030 * Test/System.Diagnostics/ProcessTest.cs: New tests for bug 477943.
* System.Diagnostics/Process.cs: Throw IOEs instead of normal
exceptions. Fixes bug 477943.

svn path=/trunk/mcs/; revision=127932
2009-02-25 02:28:14 +00:00
Raja R Harinath 9d04c77c25 * ProcessTest.cs: Import System.Threading namespace.
svn path=/trunk/mcs/; revision=122245
2008-12-30 15:00:11 +00:00
Miguel de Icaza 1755003275 A bug fix for 459450
2008-12-25  Miguel de Icaza  <[email protected]>

	* ProcessTest.cs: Created a test case from bug 459450.

2008-12-25   Leszek Ciesielski <[email protected]>

	* System.Diagnostics/Process.cs: Raise the
	Process.OutputDataReceived and Process.ErrorDataReceived with null
	arguments at the end.   This is the documented behavior:

	http://msdn.microsoft.com/en-us/library/system.diagnostics.datareceivedeventargs.data.aspx

	And CruiseControl.NET depended on this.   Bug #459450.
	
	* Microsoft.CSharp/CSharpCodeCompiler.cs: Fix the code, as it
	depened on the previous broken behavior.



svn path=/trunk/mcs/; revision=122125
2008-12-25 17:44:52 +00:00
Christian Hergert 79be0ac6d8 2008-12-09 Christian Hergert <[email protected]>
* System/Test/System.Diagnostics/CounterCreationDataTest.cs: Test to verify CounterHelp defaults to String.Empty.
	* System/System.Diagnostics/CounterCreationData.cs: Default CounterHelp to String.Empty.


svn path=/trunk/mcs/; revision=121172
2008-12-09 23:32:18 +00:00
Gert Driesen f94a21b457 * EventLogTest.cs: Fixed compiler warning.
svn path=/trunk/mcs/; revision=116358
2008-10-18 12:57:33 +00:00
Paolo Molaro bd23e8ade8 Changes to follow PlatformID corlib changes.
svn path=/trunk/mcs/; revision=115659
2008-10-13 15:04:34 +00:00
Gert Driesen 0b2a27db70 * TraceListenerTest.cs: Added test for GetSupportedAttributes.
* DelimitedTraceListener.cs: Changed accessibility of
GetSupportedAttributes to protected internal.
* DiagnosticsConfigurationHandler.cs: Use GetSupportedAttributes to
allow custom attributes on tracelisteners. Fixes bug #413203.
* TraceListener.cs: Changed accessibility of GetSupportedAttributes
to protected internal. Removed MonoTODO on GetSupportedAttributes and
Attributes. Fixed line endings.

svn path=/trunk/mcs/; revision=109500
2008-08-02 20:06:21 +00:00
Robert Jordan 2b194c193d In System.Diagnostics:
2008-06-21  Robert Jordan  <[email protected]>

	* Process.cs (Start_common): UserName may be null or empty.
	Fixes bug  #350543.

In Test/System.Diagnostics:
2008-06-21  Robert Jordan  <[email protected]>

	* ProcessTest.cs (Start_UseShellExecuteWithEmptyUserName):
	add test for bug #350543.


svn path=/trunk/mcs/; revision=106452
2008-06-23 19:09:22 +00:00
Atsushi Eno 0ec21c0ebf 2008-06-11 Atsushi Enomoto <[email protected]>
* FileVersionInfoTest.cs : disabled all English-Windows-dependent
	  tests. They all fail on Windows whose language is not English.

	  In general, be careful to compare language-dependent strings.


svn path=/trunk/mcs/; revision=105572
2008-06-11 12:19:48 +00:00
Zoltan Varga 4aeb2c0e3b 2008-05-02 Zoltan Varga <[email protected]>
* TraceTest.cs: Add a test for #385666.

svn path=/trunk/mcs/; revision=102371
2008-05-02 19:53:49 +00:00
Gert Driesen 2c28446e16 * FileVerionInfoTest.cs: Enabled test for bug #374600.
svn path=/trunk/mcs/; revision=101101
2008-04-18 08:51:05 +00:00
Gert Driesen 4d4b86ad93 * FileVersionInfoTest.cs: Enabled tests that previously failed.
Increase code coverage.

svn path=/trunk/mcs/; revision=99283
2008-03-29 12:39:22 +00:00
Gert Driesen 3009758b4d * FileVersionInfoTest.cs: Added set of (mostly notworking) tests for
FileVersionInfo, and indirectly also for AssemblyBuilder.
* FileVersionInfo.cs (GetVersionInfo): Resolve filename to absolute
path, and throw FileNotFoundException if it does not exist.
* System_test.dll.sources: Added FileVersionInfoTest.cs.

svn path=/trunk/mcs/; revision=93643
2008-01-23 12:39:43 +00:00
Gert Driesen baab1f11d4 * Process.cs: In PriorityClass setter, first check whether value is
valid and remove LAMESPEC since the documentation has been corrected 
for .NET 3.5. Code formatting.
* ProcessTest.cs: Added tests for PriorityClass.

svn path=/trunk/mcs/; revision=91804
2007-12-22 09:48:37 +00:00
Gert Driesen 3b0d04fd6c * Process.cs: Modified StartInfo to throw ArgumentNullException when
value is set to null, instead of ArgumentException. Remove check if   
file name is rooted and exists when UseShellExecute is false, and let
runtime handle this. Fixes bug #345565. When a process cannot be started, do
not access ProcessStartInfo.EnvironmentVariables since that would not allow us
to re-use the instance when changing UseShellExecute. Added argument check in
Start (ProcessStartInfo). Code formatting.
* ProcessTest.cs: Added tests for Start overloads.

svn path=/trunk/mcs/; revision=90693
2007-12-04 16:37:36 +00:00
Robert Jordan a9a707f13e 2007-11-02 Robert Jordan <[email protected]>
* ProcessTest.cs (TestRedirectedOutputIsAsync):
	Comment out the failing asserts until I've found out why they are
	failing.

svn path=/trunk/mcs/; revision=88725
2007-11-02 15:27:20 +00:00
Robert Jordan 8217b4728a 2007-11-02 Robert Jordan <[email protected]>
* ProcessTest.cs (TestRedirectedOutputIsAsync):
	Wait for the pending async operation.

svn path=/trunk/mcs/; revision=88707
2007-11-02 01:42:43 +00:00
Robert Jordan a042cffb4c 2007-11-02 Robert Jordan <[email protected]>
* ProcessTest.cs (TestRedirectedOutputIsAsync):
	Instrument to see why the build bots are failing.


svn path=/trunk/mcs/; revision=88703
2007-11-02 00:28:43 +00:00
Robert Jordan f48a4ff696 2007-11-01 Robert Jordan <[email protected]>
* ProcessTest.cs (TestRedirectedOutputIsAsync):
	Replace the generated script with a simple one (command line based).
	Add additional assert for Process.ExitCode == 0.


svn path=/trunk/mcs/; revision=88688
2007-11-01 21:26:27 +00:00
Robert Jordan 535abaefa2 In Test/System.Diagnostics:
2007-10-30  Robert Jordan  <[email protected]>

	* ProcessTest.cs: Add tests for bug #319829.

In System.Diagnostics:
2007-10-30  Robert Jordan  <[email protected]>

	* Process.cs: Wrap the redirected streams with a stream
	that provides real async Begin/Read|Write operations.
	Fixes bug #319829.

In System.IO:
2007-10-30  Robert Jordan  <[email protected]>

	* MonoSyncFileStream.cs: Add.


svn path=/trunk/mcs/; revision=88491
2007-10-30 18:35:42 +00:00
Gert Driesen 0fed5c00c9 * SwitchesTest.cs: Fixed compiler warning.
svn path=/trunk/mcs/; revision=87863
2007-10-21 09:33:34 +00:00
Gert Driesen d476d382cb * DiagnosticsConfigurationHandlerTest.cs: No longer derive from
deprecated Assertion class. Code formatting. On 2.0 profile, allow
non-integral values for switches.     
* BooleanSwitch.cs: Use base ctor for default value.
* Switch.cs: On 2.0 profile, store default value and use it if no
value is set in config file.
* SourceSwitch.cs: Use null to signal that there's no default value.

svn path=/trunk/mcs/; revision=86220
2007-09-22 17:54:03 +00:00
Gert Driesen b5039e39d7 * EventLog.cs: Do not allow all whitespace machine name. Do nothing
when setting the same value for EnableRaisingEvents, and only modify
value of field when enable/disable succeeded. Treats log name case
insensitively on all platforms, and perform reset when the log name
is changed. Validate new machine name in property, and treat it
case-insensitively. Perform reset when source is modified, and log
name was not explicitly set. When EventLog is closed, also disable
event watcher.
* LocalEventLog.cs: In Close, clean-up the FileSystemWatcher. Add
locking to Created eventhandler to avoid duplicate notifications.
* Win32EventLog.cs: Cache handle for reading from eventlog. In Close,
close the read handle. Implement support for watching win32 eventlog.
Fixes bug #82436.
* EventLogTest.cs: Added tests for validity of machine name. Added
tests for case-insensitivity of Source, Log and MachineName.

svn path=/trunk/mcs/; revision=84049
2007-08-14 11:23:24 +00:00
Atsushi Eno 520f81d70b 2007-08-06 Atsushi Enomoto <[email protected]>
* Process.cs, ProcessStartInfo.cs : added StandardOutputEncoding
	  and StandardErrorEncoding.

	* ProcessStartInfoTest.cs: tests for Standard[Output|Error]Encoding.


svn path=/trunk/mcs/; revision=83566
2007-08-06 23:46:28 +00:00
Raja R Harinath f36b1982dc In .:
2007-07-11  Ankit Jain  <[email protected]>

	* System_test.dll.sources: Add ProcessStartInfoTest.cs.

In System.Diagnostics:
2007-07-11  Ankit Jain  <[email protected]>

	* ProcessStartInfo.cs (WorkingDirectory.set): Don't set
	working_directory to null.

In Test/System.Diagnostics:
2007-07-11  Ankit Jain  <[email protected]>

	* ProcessStartInfoTest.cs: New.

svn path=/trunk/mcs/; revision=81783
2007-07-11 11:13:13 +00:00
Atsushi Eno ee87d24b2e 2007-05-19 Atsushi Enomoto <[email protected]>
* TraceListener.cs : in TraceTransfer(), use TraceEvent() (some
	  derived classes depend on this change).
	* DelimitedListTraceListener.cs : implemented.

	* DelimitedListTraceListenerTest.cs : new test.

	* System_test.dll.sources : added DelimitedListTraceListenerTest.cs.


svn path=/trunk/mcs/; revision=77614
2007-05-18 08:35:41 +00:00
Atsushi Eno 720ddca1bd 2007-05-17 Atsushi Enomoto <[email protected]>
* TraceOptions.cs : new enum.
	* TraceListener.cs : support TraceOutputOptions. Fixed missing
	  NET_2_0 condition in TARGET_JVM section.
	* TraceSwitch.cs, BooleanSwitch.cs :
	  Added missing constructors and OnValueChanged().
	* Trace.cs, TraceImpl.cs :
	  Added CorrelationManager and UseGlobalLock.
	* TraceEventCache.cs : initialize property values at construction.
	* Switch.cs : added XmlIgnore on Attributes.

	* SwitchesTest.cs : added tests for BooleanSwitch Value.
	* TraceListenerTest.cs : added test for TraceOutputOptions.

	* System.dll.sources : added TraceOptions.cs.


svn path=/trunk/mcs/; revision=77581
2007-05-17 17:10:25 +00:00