Skip to content

Commit

Permalink
common: make outerrmsg use configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszkapela authored and krzycz committed Mar 15, 2017
1 parent 66359c8 commit 761821d
Show file tree
Hide file tree
Showing 19 changed files with 72 additions and 305 deletions.
56 changes: 28 additions & 28 deletions src/NVML.sln
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pmempool_transform", "test\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmem_out_of_memory", "test\vmem_out_of_memory\vmem_out_of_memory.vcxproj", "{26D24B3D-22CE-44EB-AA21-2BF594F80520}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpmempool_test_win", "test\libpmempool_api_win\libpmempool_test_win.vcxproj", "{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "obj_toid", "test\obj_toid\obj_toid.vcxproj", "{296F3C5D-3951-423E-8E2F-FD4A37958C72}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blk_include", "test\blk_include\blk_include.vcxproj", "{29D9376B-DC36-4940-83F1-A7CBE38A2103}"
Expand Down Expand Up @@ -272,6 +274,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "obj_pmalloc_basic", "test\o
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pmem_memcpy", "test\pmem_memcpy\pmem_memcpy.vcxproj", "{673277EC-D26B-414D-92E3-84EE873316A8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpmempool_rm_win", "test\libpmempool_rm_win\libpmempool_rm_win.vcxproj", "{67AC1343-98FD-4143-92C0-559C55F749F5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blk_rw", "test\blk_rw\blk_rw.vcxproj", "{6851356E-A5D9-46A6-8262-A7E208729F18}"
ProjectSection(ProjectDependencies) = postProject
{9E9E3D25-2139-4A5D-9200-18148DDEAD45} = {9E9E3D25-2139-4A5D-9200-18148DDEAD45}
Expand Down Expand Up @@ -550,6 +554,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checksum", "test\checksum\c
{CE3F2DFB-8470-4802-AD37-21CAF6CB2681} = {CE3F2DFB-8470-4802-AD37-21CAF6CB2681}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpmempool_transform_win", "test\libpmempool_transform_win\libpmempool_transform_win.vcxproj", "{B30C6212-A160-405A-8FE7-340E721738A2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pmemwrite", "test\tools\pmemwrite\pmemwrite.vcxproj", "{B35BFA09-DE68-483B-AB61-8790E8F060A8}"
ProjectSection(ProjectDependencies) = postProject
{901F04DB-E1A5-4A41-8B81-9D31C19ACD59} = {901F04DB-E1A5-4A41-8B81-9D31C19ACD59}
Expand All @@ -561,6 +567,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblinux", "windows\liblinu
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ex_linkedlist", "test\ex_linkedlist\ex_linkedlist.vcxproj", "{B440BB05-37A8-42EA-98D3-D83EB113E497}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpmempool_sync_win", "test\libpmempool_sync_win\libpmempool_sync_win.vcxproj", "{B6DA6617-D98F-4A4D-A7C4-A317212924BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pmemspoil", "test\pmemspoil\pmemspoil.vcxproj", "{B6F4B85D-FE55-4A1B-AE97-D4A9ECFE195F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "obj_pool_win", "test\obj_pool_win\obj_pool_win.vcxproj", "{B775480C-5B32-4F64-B026-47367280EC56}"
Expand Down Expand Up @@ -761,14 +769,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmem_check", "test\vmem_che
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "obj_list_remove", "test\obj_list_remove\obj_list_remove.vcxproj", "{FF6E5B0C-DC00-4C93-B9C2-63D1E858BA79}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpmempool_test_win", "test\libpmempool_api_win\libpmempool_test_win.vcxproj", "{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpmempool_rm_win", "test\libpmempool_rm_win\libpmempool_rm_win.vcxproj", "{67AC1343-98FD-4143-92C0-559C55F749F5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpmempool_sync_win", "test\libpmempool_sync_win\libpmempool_sync_win.vcxproj", "{B6DA6617-D98F-4A4D-A7C4-A317212924BF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpmempool_transform_win", "test\libpmempool_transform_win\libpmempool_transform_win.vcxproj", "{B30C6212-A160-405A-8FE7-340E721738A2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand Down Expand Up @@ -926,6 +926,10 @@ Global
{26D24B3D-22CE-44EB-AA21-2BF594F80520}.Debug|x64.Build.0 = Debug|x64
{26D24B3D-22CE-44EB-AA21-2BF594F80520}.Release|x64.ActiveCfg = Release|x64
{26D24B3D-22CE-44EB-AA21-2BF594F80520}.Release|x64.Build.0 = Release|x64
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}.Debug|x64.ActiveCfg = Debug|x64
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}.Debug|x64.Build.0 = Debug|x64
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}.Release|x64.ActiveCfg = Release|x64
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}.Release|x64.Build.0 = Release|x64
{296F3C5D-3951-423E-8E2F-FD4A37958C72}.Debug|x64.ActiveCfg = Debug|x64
{296F3C5D-3951-423E-8E2F-FD4A37958C72}.Debug|x64.Build.0 = Debug|x64
{296F3C5D-3951-423E-8E2F-FD4A37958C72}.Release|x64.ActiveCfg = Release|x64
Expand Down Expand Up @@ -1154,6 +1158,10 @@ Global
{673277EC-D26B-414D-92E3-84EE873316A8}.Debug|x64.Build.0 = Debug|x64
{673277EC-D26B-414D-92E3-84EE873316A8}.Release|x64.ActiveCfg = Release|x64
{673277EC-D26B-414D-92E3-84EE873316A8}.Release|x64.Build.0 = Release|x64
{67AC1343-98FD-4143-92C0-559C55F749F5}.Debug|x64.ActiveCfg = Debug|x64
{67AC1343-98FD-4143-92C0-559C55F749F5}.Debug|x64.Build.0 = Debug|x64
{67AC1343-98FD-4143-92C0-559C55F749F5}.Release|x64.ActiveCfg = Release|x64
{67AC1343-98FD-4143-92C0-559C55F749F5}.Release|x64.Build.0 = Release|x64
{6851356E-A5D9-46A6-8262-A7E208729F18}.Debug|x64.ActiveCfg = Debug|x64
{6851356E-A5D9-46A6-8262-A7E208729F18}.Debug|x64.Build.0 = Debug|x64
{6851356E-A5D9-46A6-8262-A7E208729F18}.Release|x64.ActiveCfg = Release|x64
Expand Down Expand Up @@ -1445,6 +1453,10 @@ Global
{AF0B7480-EBE3-486B-B0C8-134910BC9324}.Debug|x64.Build.0 = Debug|x64
{AF0B7480-EBE3-486B-B0C8-134910BC9324}.Release|x64.ActiveCfg = Release|x64
{AF0B7480-EBE3-486B-B0C8-134910BC9324}.Release|x64.Build.0 = Release|x64
{B30C6212-A160-405A-8FE7-340E721738A2}.Debug|x64.ActiveCfg = Debug|x64
{B30C6212-A160-405A-8FE7-340E721738A2}.Debug|x64.Build.0 = Debug|x64
{B30C6212-A160-405A-8FE7-340E721738A2}.Release|x64.ActiveCfg = Release|x64
{B30C6212-A160-405A-8FE7-340E721738A2}.Release|x64.Build.0 = Release|x64
{B35BFA09-DE68-483B-AB61-8790E8F060A8}.Debug|x64.ActiveCfg = Debug|x64
{B35BFA09-DE68-483B-AB61-8790E8F060A8}.Debug|x64.Build.0 = Debug|x64
{B35BFA09-DE68-483B-AB61-8790E8F060A8}.Release|x64.ActiveCfg = Release|x64
Expand All @@ -1461,6 +1473,10 @@ Global
{B440BB05-37A8-42EA-98D3-D83EB113E497}.Debug|x64.Build.0 = Debug|x64
{B440BB05-37A8-42EA-98D3-D83EB113E497}.Release|x64.ActiveCfg = Release|x64
{B440BB05-37A8-42EA-98D3-D83EB113E497}.Release|x64.Build.0 = Release|x64
{B6DA6617-D98F-4A4D-A7C4-A317212924BF}.Debug|x64.ActiveCfg = Debug|x64
{B6DA6617-D98F-4A4D-A7C4-A317212924BF}.Debug|x64.Build.0 = Debug|x64
{B6DA6617-D98F-4A4D-A7C4-A317212924BF}.Release|x64.ActiveCfg = Release|x64
{B6DA6617-D98F-4A4D-A7C4-A317212924BF}.Release|x64.Build.0 = Release|x64
{B6F4B85D-FE55-4A1B-AE97-D4A9ECFE195F}.Debug|x64.ActiveCfg = Debug|x64
{B6F4B85D-FE55-4A1B-AE97-D4A9ECFE195F}.Debug|x64.Build.0 = Debug|x64
{B6F4B85D-FE55-4A1B-AE97-D4A9ECFE195F}.Release|x64.ActiveCfg = Release|x64
Expand Down Expand Up @@ -1712,22 +1728,6 @@ Global
{FF6E5B0C-DC00-4C93-B9C2-63D1E858BA79}.Debug|x64.Build.0 = Debug|x64
{FF6E5B0C-DC00-4C93-B9C2-63D1E858BA79}.Release|x64.ActiveCfg = Release|x64
{FF6E5B0C-DC00-4C93-B9C2-63D1E858BA79}.Release|x64.Build.0 = Release|x64
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}.Debug|x64.ActiveCfg = Debug|x64
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}.Debug|x64.Build.0 = Debug|x64
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}.Release|x64.ActiveCfg = Release|x64
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA}.Release|x64.Build.0 = Release|x64
{67AC1343-98FD-4143-92C0-559C55F749F5}.Debug|x64.ActiveCfg = Debug|x64
{67AC1343-98FD-4143-92C0-559C55F749F5}.Debug|x64.Build.0 = Debug|x64
{67AC1343-98FD-4143-92C0-559C55F749F5}.Release|x64.ActiveCfg = Release|x64
{67AC1343-98FD-4143-92C0-559C55F749F5}.Release|x64.Build.0 = Release|x64
{B6DA6617-D98F-4A4D-A7C4-A317212924BF}.Debug|x64.ActiveCfg = Debug|x64
{B6DA6617-D98F-4A4D-A7C4-A317212924BF}.Debug|x64.Build.0 = Debug|x64
{B6DA6617-D98F-4A4D-A7C4-A317212924BF}.Release|x64.ActiveCfg = Release|x64
{B6DA6617-D98F-4A4D-A7C4-A317212924BF}.Release|x64.Build.0 = Release|x64
{B30C6212-A160-405A-8FE7-340E721738A2}.Debug|x64.ActiveCfg = Debug|x64
{B30C6212-A160-405A-8FE7-340E721738A2}.Debug|x64.Build.0 = Debug|x64
{B30C6212-A160-405A-8FE7-340E721738A2}.Release|x64.ActiveCfg = Release|x64
{B30C6212-A160-405A-8FE7-340E721738A2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1773,6 +1773,7 @@ Global
{25B5C601-03D7-4861-9C0F-7F0453B04227} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{26166DF1-3C94-44AF-9075-BA31DCD2F6BB} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{26D24B3D-22CE-44EB-AA21-2BF594F80520} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{296F3C5D-3951-423E-8E2F-FD4A37958C72} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{29D9376B-DC36-4940-83F1-A7CBE38A2103} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{2A1D6AF2-7336-4966-A4B3-0BE9A24BAE00} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
Expand Down Expand Up @@ -1831,6 +1832,7 @@ Global
{6516D6CF-8000-4341-9487-312BC83EE370} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{65D92D98-97E1-48F7-AEF6-75221CF48EA4} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{673277EC-D26B-414D-92E3-84EE873316A8} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{67AC1343-98FD-4143-92C0-559C55F749F5} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{6851356E-A5D9-46A6-8262-A7E208729F18} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{6AE1B8BE-D46A-4E99-87A2-F160FB950DCA} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{6B492754-9F80-44B3-A2A7-1D98AF06F3B2} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
Expand Down Expand Up @@ -1911,10 +1913,12 @@ Global
{AE1C32FB-9B52-4760-ABFC-0D2FA2C7A6C8} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{AE9E908D-BAEC-491F-9914-436B3CE35E94} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{AF0B7480-EBE3-486B-B0C8-134910BC9324} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B30C6212-A160-405A-8FE7-340E721738A2} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B35BFA09-DE68-483B-AB61-8790E8F060A8} = {F09A0864-9221-47AD-872F-D4538104D747}
{B36F115C-8139-4C35-A3E7-E6BF9F3DA793} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B3FF772D-F2FF-4E6E-ABD8-763407BB6A5C} = {853D45D8-980C-4991-B62A-DAC6FD245402}
{B440BB05-37A8-42EA-98D3-D83EB113E497} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B6DA6617-D98F-4A4D-A7C4-A317212924BF} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B6F4B85D-FE55-4A1B-AE97-D4A9ECFE195F} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B775480C-5B32-4F64-B026-47367280EC56} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B887EA26-846C-4D6A-B0E4-432487506BC7} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
Expand Down Expand Up @@ -1986,9 +1990,5 @@ Global
{FEA09B48-34C2-4963-8A5A-F97BDA136D72} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{FF374D62-CBCF-401E-9A02-1D3DB8BE16E4} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{FF6E5B0C-DC00-4C93-B9C2-63D1E858BA79} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{27FA11C6-431D-41D1-A417-FAB7C4F93DCA} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{67AC1343-98FD-4143-92C0-559C55F749F5} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B6DA6617-D98F-4A4D-A7C4-A317212924BF} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
{B30C6212-A160-405A-8FE7-340E721738A2} = {746BA101-5C93-42A5-AC7A-64DCEB186572}
EndGlobalSection
EndGlobal
37 changes: 11 additions & 26 deletions src/test/out_err_mt_win/TEST0w.PS1 → src/test/out_err/config.PS1
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#
# Copyright 2015-2017, Intel Corporation
# Copyright (c) 2016, Microsoft Corporation. All rights reserved.
#
# Copyright 2017, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -30,31 +29,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

#
# src/test/out_err_mt_win/TEST0 -- unit test for error messages
# out_err/config.PS1 -- test configuration
#
[CmdletBinding(PositionalBinding=$false)]
Param(
[alias("d")]
$DIR = ""
)
$Env:UNITTEST_NAME = "out_err_mt_win\TEST0"
$Env:UNITTEST_NUM = "0w"


# standard unit test setup
. ..\unittest\unittest.ps1

require_test_type medium

require_fs_type any

setup

expect_normal_exit $Env:EXE_DIR\out_err_mt_win$Env:EXESUFFIX `
$DIR\testfile1 $DIR\testfile2 $DIR\testfile3 $DIR
$global:encoding_dict = @{
ascii = new-object PSObject | select-object sufixexe, sufix;
utf16 = new-object PSObject | select-object sufixexe, sufix;
}

check
$global:encoding_dict.Get_Item("ascii").sufixexe = ".exe"
$global:encoding_dict.Get_Item("ascii").sufix = ""

pass
$global:encoding_dict.Get_Item("utf16").sufixexe = "_win.exe"
$global:encoding_dict.Get_Item("utf16").sufix = "😘⠝⠧⠍⠇ɗNVMLӜ⥺🙋"
48 changes: 5 additions & 43 deletions src/test/out_err_mt_win/TEST2w.PS1 → src/test/out_err/config.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
#
# Copyright 2015-2017, Intel Corporation
# Copyright (c) 2016, Microsoft Corporation. All rights reserved.
# Copyright 2017, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -30,47 +30,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

#
# src/test/out_err_mt_win/TEST2 -- unit test for error messages
# out_err/config.sh -- test configuration
#
[CmdletBinding(PositionalBinding=$false)]
Param(
[alias("d")]
$DIR = ""
)
$Env:UNITTEST_NAME = "out_err_mt_win\TEST2"
$Env:UNITTEST_NUM = "2w"


# standard unit test setup
. ..\unittest\unittest.ps1

require_test_type medium

require_fs_type any

# XXX: we don't have valgrind in Windows yet
# require_valgrind_dev_3_7
# configure_valgrind helgrind force-enable

setup

$Env:PMEM_LOG_LEVEL = $null
$Env:PMEMLOG_LOG_LEVEL = $null
$Env:PMEMBLK_LOG_LEVEL = $null
$Env:PMEMOBJ_LOG_LEVEL = $null
$Env:VMEM_LOG_LEVEL = $null

$Env:PMEM_LOG_FILE = $null
$Env:PMEMLOG_LOG_FILE = $null
$Env:PMEMBLK_LOG_FILE = $null
$Env:PMEMOBJ_LOG_FILE = $null
$Env:VMEM_LOG_FILE = $null

expect_normal_exit $Env:EXE_DIR\out_err_mt_win$Env:EXESUFFIX `
$DIR\testfile1 $DIR\testfile2 $DIR\testfile3 $DIR

check

pass
CONF_GLOBAL_ENCODING="ascii unicode"
CONF_GLOBAL_UNICODE_SUFFIX="😘⠝⠧⠍⠇ɗNVMLӜ⥺🙋"
2 changes: 1 addition & 1 deletion src/test/out_err/out0.log.match
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
out_err$(nW)TEST0: START: out_err
out_err$(nW)TEST0: START: out_err$(nW)
$(nW)out_err$(nW)
ERR #1
ERR #2: Success
Expand Down
8 changes: 4 additions & 4 deletions src/test/out_err/traces0.log.match
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ $(OPT)<trace>: <1> [out.c:$(N) out_init]$(W)compiled with support for Valgrind p
$(OPT)<trace>: <1> [out.c:$(N) out_init]$(W)compiled with support for Valgrind helgrind
$(OPT)<trace>: <1> [out.c:$(N) out_init]$(W)compiled with support for Valgrind memcheck
$(OPT)<trace>: <1> [out.c:$(N) out_init]$(W)compiled with support for Valgrind drd
<trace>: <1> [out_err.c:$(N) main]$(W)ERR #1
<trace>: <1> [out_err.c:$(N) main]$(W)ERR #2: Success
<trace>: <1> [out_err.c:$(N) main]$(W)ERR #3: Invalid argument
<trace>: <1> [out_err.c:$(N) main]$(W)ERR1: Bad file descriptor:1234
<trace>: <1> [out_err$(nW).c:$(N) $(nW)main]$(W)ERR #1
<trace>: <1> [out_err$(nW).c:$(N) $(nW)main]$(W)ERR #2: Success
<trace>: <1> [out_err$(nW).c:$(N) $(nW)main]$(W)ERR #3: Invalid argument
<trace>: <1> [out_err$(nW).c:$(N) $(nW)main]$(W)ERR1: Bad file descriptor:1234
ERR2: Bad file descriptor:1234
43 changes: 11 additions & 32 deletions src/test/out_err_win/TEST0.PS1 → src/test/out_err_mt/config.PS1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2016-2017, Intel Corporation
#
# Copyright 2017, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -29,38 +29,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

#
# src/test/out_err_win/TEST0 -- unit test for out_err_win()
#

#
# parameter handling
# out_err_mt/config.PS1 -- test configuration
#
[CmdletBinding(PositionalBinding=$false)]
Param(
[alias("d")]
$DIR = ""
)
$Env:UNITTEST_NAME = "out_err_win\TEST0"
$Env:UNITTEST_NUM = "0"


# standard unit test setup
. ..\unittest\unittest.ps1

require_test_type medium

require_fs_type none
require_build_type debug

setup

$Env:TRACE_LOG_LEVEL = 1
$Env:TRACE_LOG_FILE = ".\traces$Env:UNITTEST_NUM.log"

expect_normal_exit $Env:EXE_DIR\out_err_win$Env:EXESUFFIX
$global:encoding_dict = @{
ascii = new-object PSObject | select-object sufixexe, sufix;
utf16 = new-object PSObject | select-object sufixexe, sufix;
}

check
$global:encoding_dict.Get_Item("ascii").sufixexe = ".exe"
$global:encoding_dict.Get_Item("ascii").sufix = ""

pass
$global:encoding_dict.Get_Item("utf16").sufixexe = "_win.exe"
$global:encoding_dict.Get_Item("utf16").sufix = "😘⠝⠧⠍⠇ɗNVMLӜ⥺🙋"
Loading

0 comments on commit 761821d

Please sign in to comment.