Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Commit

Permalink
Fix more tests on Linux (#1552)
Browse files Browse the repository at this point in the history
* Fix more tests on Linux

* Namespace on windows
  • Loading branch information
slide authored Dec 7, 2016
1 parent e4308e8 commit 7f95557
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def expandvars(path):
return path
import string
varchars = string.ascii_letters + string.digits + '_-'
if isinstance(path, _unicode):
if sys.platform != 'cli' and isinstance(path, _unicode):
encoding = sys.getfilesystemencoding()
def getenv(var):
return os.environ[var.encode(encoding)].decode(encoding)
Expand Down
35 changes: 20 additions & 15 deletions Languages/IronPython/Tests/modules/misc/system_namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'''

#--IMPORTS---------------------------------------------------------------------
from iptest.assert_util import skiptest, is_cli, run_test
from iptest.assert_util import skiptest, is_cli, run_test, is_posix
skiptest("win32", "silverlight")
skiptest("netstandard") # references are different in netstandard

Expand All @@ -27,7 +27,10 @@
clr.AddReference("System.Configuration.Install")
clr.AddReference("System.Data")
clr.AddReference("System.Data.OracleClient")
clr.AddReference("System.Data.SqlXml")
if is_posix:
clr.AddReference("System.Data.SqlClient")
else:
clr.AddReference("System.Data.SqlXml")
clr.AddReference("System.Deployment")
clr.AddReference("System.Design")
clr.AddReference("System.DirectoryServices")
Expand All @@ -47,7 +50,7 @@
clr.AddReference("System.Web.RegularExpressions")
clr.AddReference("System.Web.Services")
clr.AddReference("System.Windows.Forms")
clr.AddReference("System.XML")
clr.AddReference("System.Xml")

from System import *
from System.CodeDom import *
Expand All @@ -74,8 +77,9 @@
from System.Data.Sql import *
from System.Data.SqlClient import *
from System.Data.SqlTypes import *
from System.Deployment.Application import *
from System.Deployment.Internal import *
if not is_posix:
from System.Deployment.Application import *
from System.Deployment.Internal import *
from System.Diagnostics import *
from System.Diagnostics.CodeAnalysis import *
from System.Diagnostics.Design import *
Expand All @@ -102,8 +106,7 @@
from System.Media import *
from System.Messaging import *
from System.Messaging.Design import *
#http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=25806
#from System.Net import *
from System.Net import *
from System.Net.Cache import *
from System.Net.Configuration import *
from System.Net.Mail import *
Expand Down Expand Up @@ -168,9 +171,10 @@
from System.Web.Hosting import *
from System.Web.Mail import *
from System.Web.Management import *
from System.Web.Mobile import *
if not is_posix:
from System.Web.Mobile import *
from System.Web.RegularExpressions import *
from System.Web.Profile import *
from System.Web.RegularExpressions import *
from System.Web.Security import *
from System.Web.Services import *
from System.Web.Services.Configuration import *
Expand All @@ -181,14 +185,15 @@
from System.Web.UI import *
from System.Web.UI.Adapters import *
from System.Web.UI.Design import *
from System.Web.UI.Design.MobileControls import *
from System.Web.UI.Design.MobileControls.Converters import *
if not is_posix:
from System.Web.UI.Design.MobileControls import *
from System.Web.UI.Design.MobileControls.Converters import *
from System.Web.UI.MobileControls import *
from System.Web.UI.MobileControls.Adapters import *
from System.Web.UI.MobileControls.Adapters.XhtmlAdapters import *
from System.Web.UI.Design.WebControls.WebParts import *
from System.Web.UI.Design.WebControls import *
from System.Web.UI.Design.WebControls.WebParts import *
from System.Web.UI.HtmlControls import *
from System.Web.UI.MobileControls import *
from System.Web.UI.MobileControls.Adapters import *
from System.Web.UI.MobileControls.Adapters.XhtmlAdapters import *
from System.Web.UI.WebControls import *
from System.Web.UI.WebControls.Adapters import *
from System.Web.UI.WebControls.WebParts import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def test_version():
# 2.7.5 (IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.18444 (32-bit))
# 2.7.6a0 (IronPython 2.7.6a0 DEBUG (2.7.6.0) on .NET 4.0.30319.18444 (32-bit))
# 2.7.6 (IronPython 2.7.6.3 (2.7.6.3) on .NET 4.0.30319.42000 (32-bit))
regex = "^\d\.\d\.\d((RC\d+ )|(a\d+ )|(b\d+ )|( ))\(IronPython \d\.\d(\.\d)?(\.\d)?((RC\d+ )|(a\d+ )|(b\d+ )|( ))?((DEBUG )|()|(\d?))\(\d\.\d\.\d{1,8}\.\d{1,8}\) on \.NET \d(\.\d{1,5}){3} \(32-bit\)\)$"
regex = "^\d\.\d\.\d((RC\d+ )|(a\d+ )|(b\d+ )|( ))\(IronPython \d\.\d(\.\d)?(\.\d)?((RC\d+ )|(a\d+ )|(b\d+ )|( ))?((DEBUG )|()|(\d?))\(\d\.\d\.\d{1,8}\.\d{1,8}\) on ((\.NET)|(Mono)) \d(\.\d{1,5}){3} \(((32)|(64))-bit\)\)$"
Assert(re.match(regex, sys.version, re.IGNORECASE) != None)

def test_winver():
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
all: ironpython

ironpython:
xbuild Build.proj /t:Build "/p:Mono=true;BaseConfiguration=Debug"
xbuild Build.proj /t:Build "/p:Mono=true;BaseConfiguration=Debug" /verbosity:minimal /nologo

ironpython-release:
xbuild Build.proj /t:Build "/p:Mono=true;BaseConfiguration=Release"
xbuild Build.proj /t:Build "/p:Mono=true;BaseConfiguration=Release" /verbosity:minimal /nologo

testrunner:
xbuild Test/ClrAssembly/ClrAssembly.csproj /t:Rebuild /p:Configuration=Debug
xbuild Test/TestRunner/TestRunner.sln /p:Configuration=Debug
xbuild Test/ClrAssembly/ClrAssembly.csproj /t:Rebuild /p:Configuration=Debug /verbosity:minimal /nologo
xbuild Test/TestRunner/TestRunner.sln /p:Configuration=Debug /verbosity:minimal /nologo
rm -rf bin/Debug/DLLs/PresentationFramework.dll \
bin/Debug/DLLs/IronPython.Wpf.dll \
bin/Debug/DLLs/WindowsBase.dll \
bin/Debug/DLLs/System.Xaml.dll

testrunner-release:
xbuild Test/ClrAssembly/ClrAssembly.csproj /t:Rebuild /p:Configuration=Release
xbuild Test/TestRunner/TestRunner.sln /p:Configuration=Release
xbuild Test/ClrAssembly/ClrAssembly.csproj /t:Rebuild /p:Configuration=Release /verbosity:minimal /nologo
xbuild Test/TestRunner/TestRunner.sln /p:Configuration=Release /verbosity:minimal /nologo
rm -rf bin/Release/DLLs/PresentationFramework.dll \
bin/Release/DLLs/IronPython.Wpf.dll \
bin/Release/DLLs/WindowsBase.dll \
Expand Down Expand Up @@ -47,7 +47,7 @@ test-ipy-disabled-release: ironpython-release testrunner-release
Test/IronPython.tests /binpath:bin/Release /all /runlong /rundisabled

package-release:
xbuild Build.proj /t:Package "/p:Mono=true;BaseConfiguration=Release" /nologo
xbuild Build.proj /t:Package "/p:Mono=true;BaseConfiguration=Release" /verbosity:minimal /nologo

clean:
xbuild Build.proj /t:Clean /p:Mono=true /verbosity:minimal /nologo
Expand Down
1 change: 1 addition & 0 deletions Test/IronPython.tests
Original file line number Diff line number Diff line change
Expand Up @@ -4251,6 +4251,7 @@
<MaxDuration>600000</MaxDuration>
<LongRunning>true</LongRunning>
<Disabled>false</Disabled>
<Condition>'$(OS)' != 'Unix'</Condition>
<RequiresAdmin>false</RequiresAdmin>
<NotParallelSafe>false</NotParallelSafe>
<WorkingDirectory>%DLR_ROOT%\External.LCA_RESTRICTED\Languages\IronPython\27\Lib</WorkingDirectory>
Expand Down
147 changes: 0 additions & 147 deletions Util/IronPython/Lib/iptest/process_util.py

This file was deleted.

0 comments on commit 7f95557

Please sign in to comment.