mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 11:18:49 +00:00
Fuchsia: Builds run_vm_tests and a wrapper program for running it.
This CL adds rules to the GN build for building run_vm_tests for Fuchsia. It also adds a wrapper program in //runtime/bin/run_vm_tests_fuchsia.cc and a file containing the output of 'run_vm_tests --list', //runtime/bin/fuchsia_vm_tests.txt. The wrapper program and text file make it easier to run the tests on Fuchsia, and should be able to go away once we are out of the bootstrapping phase. R=asiva@google.com Review URL: https://codereview.chromium.org/2187153003 .
This commit is contained in:
parent
1d7b59fa9e
commit
5475ab6fbb
|
@ -504,4 +504,88 @@ if (defined(is_fuchsia) && is_fuchsia) {
|
|||
"//third_party",
|
||||
]
|
||||
}
|
||||
|
||||
action("generate_snapshot_test_dat_file") {
|
||||
snapshot_test_dat_file = "$root_gen_dir/snapshot_test.dat"
|
||||
snapshot_test_in_dat_file = "../vm/snapshot_test_in.dat"
|
||||
snapshot_test_dart_file = "../vm/snapshot_test.dart"
|
||||
inputs = [
|
||||
"../tools/create_string_literal.py",
|
||||
snapshot_test_in_dat_file,
|
||||
snapshot_test_dart_file,
|
||||
]
|
||||
|
||||
outputs = [
|
||||
snapshot_test_dat_file,
|
||||
]
|
||||
|
||||
script = "../tools/create_string_literal.py"
|
||||
args = [
|
||||
"--output",
|
||||
rebase_path(snapshot_test_dat_file),
|
||||
"--input_cc",
|
||||
rebase_path(snapshot_test_in_dat_file),
|
||||
"--include",
|
||||
"INTENTIONALLY_LEFT_BLANK",
|
||||
"--var_name",
|
||||
"INTENTIONALLY_LEFT_BLANK_TOO",
|
||||
rebase_path(snapshot_test_dart_file),
|
||||
]
|
||||
}
|
||||
|
||||
executable("run_vm_tests") {
|
||||
testonly = true
|
||||
configs += ["..:dart_config",
|
||||
"..:dart_product_config",
|
||||
"..:dart_precompiled_runtime_config",]
|
||||
deps = [
|
||||
"..:libdart",
|
||||
":libdart_builtin",
|
||||
":embedded_dart_io",
|
||||
":dart_snapshot_cc",
|
||||
":generate_snapshot_test_dat_file",
|
||||
"../vm:libdart_platform",
|
||||
"//third_party/zlib",
|
||||
]
|
||||
include_dirs = [
|
||||
"..",
|
||||
"$target_gen_dir",
|
||||
]
|
||||
defines = [
|
||||
"TESTING",
|
||||
]
|
||||
|
||||
vm_tests_list = exec_script("../../tools/gypi_to_gn.py",
|
||||
[rebase_path("../vm/vm_sources.gypi"),
|
||||
"--keep_only=_test.cc",
|
||||
"--keep_only=_test.h",],
|
||||
"scope",
|
||||
["../vm/vm_sources.gypi"])
|
||||
vm_tests = rebase_path(vm_tests_list.sources, ".", "../vm")
|
||||
|
||||
builtin_impl_tests_list =
|
||||
exec_script("../../tools/gypi_to_gn.py",
|
||||
[rebase_path("builtin_impl_sources.gypi"),
|
||||
"--keep_only=_test.cc",
|
||||
"--keep_only=_test.h",],
|
||||
"scope",
|
||||
["builtin_impl_sources.gypi"])
|
||||
|
||||
sources = [
|
||||
"run_vm_tests.cc",
|
||||
] + builtin_impl_tests_list.sources + vm_tests
|
||||
}
|
||||
|
||||
copy("fuchsia_vm_tests") {
|
||||
sources = [ "fuchsia_vm_tests.txt" ]
|
||||
outputs = [ "$root_out_dir/fuchsia_vm_tests.txt" ]
|
||||
}
|
||||
|
||||
executable("run_vm_tests_fuchsia") {
|
||||
testonly = true
|
||||
configs += ["..:dart_config"]
|
||||
sources = [
|
||||
"run_vm_tests_fuchsia.cc"
|
||||
]
|
||||
}
|
||||
} # defined(is_fuchsia) && is_fuchsia
|
||||
|
|
915
runtime/bin/fuchsia_vm_tests.txt
Normal file
915
runtime/bin/fuchsia_vm_tests.txt
Normal file
|
@ -0,0 +1,915 @@
|
|||
CircularLinkedList
|
||||
Read
|
||||
FileLength
|
||||
FilePosition
|
||||
Set
|
||||
StackAllocatedDestruction
|
||||
StackAllocatedLongJump
|
||||
StackResourceDestruction
|
||||
StackResourceLongJump
|
||||
StoreIntoObject
|
||||
ReadArgument
|
||||
AddressingModes
|
||||
JumpAroundCrash
|
||||
SimpleLoop
|
||||
Cmpb
|
||||
Testb
|
||||
Increment
|
||||
IncrementLong
|
||||
Decrement
|
||||
DecrementLong
|
||||
SignedMultiply
|
||||
UnsignedMultiply
|
||||
SignedMultiply64
|
||||
SignedMultiplyLong
|
||||
OverflowSignedMultiply
|
||||
SignedMultiply1
|
||||
SignedMultiply2
|
||||
UnsignedMultiplyLong
|
||||
SignedDivide
|
||||
UnsignedDivide
|
||||
SignedDivideLong
|
||||
UnsignedDivideLong
|
||||
Negate
|
||||
BitScanReverse
|
||||
MoveExtend
|
||||
MoveExtend32
|
||||
MoveExtendMemory
|
||||
MoveExtend32Memory
|
||||
MoveWord
|
||||
MoveWordRex
|
||||
LongAddReg
|
||||
LongAddImmediate
|
||||
LongAddAddress
|
||||
LongSubReg
|
||||
LongSubImmediate
|
||||
LongSubAddress
|
||||
AddReg
|
||||
AddImmediate
|
||||
AddAddress
|
||||
SubReg
|
||||
SubImmediate
|
||||
SubAddress
|
||||
Bitwise
|
||||
Bitwise64
|
||||
LogicalOps
|
||||
LogicalOps64
|
||||
LogicalTestL
|
||||
LogicalTestQ
|
||||
CompareSwapEQ
|
||||
CompareSwapNEQ
|
||||
Exchange
|
||||
LargeConstant
|
||||
CallSimpleLeaf
|
||||
JumpSimpleLeaf
|
||||
JumpIndirect
|
||||
SingleFPMoves
|
||||
SingleFPMoves2
|
||||
PackedDoubleAdd
|
||||
PackedDoubleSub
|
||||
PackedDoubleNegate
|
||||
PackedDoubleAbsolute
|
||||
PackedDoubleMul
|
||||
PackedDoubleDiv
|
||||
PackedDoubleSqrt
|
||||
PackedDoubleMin
|
||||
PackedDoubleMax
|
||||
PackedDoubleShuffle
|
||||
PackedDoubleToSingle
|
||||
PackedSingleToDouble
|
||||
SingleFPOperations
|
||||
PackedFPOperations
|
||||
PackedIntOperations
|
||||
PackedIntOperations2
|
||||
PackedFPOperations2
|
||||
PackedCompareEQ
|
||||
PackedCompareNEQ
|
||||
PackedCompareLT
|
||||
PackedCompareLE
|
||||
PackedCompareNLT
|
||||
PackedCompareNLE
|
||||
PackedNegate
|
||||
PackedAbsolute
|
||||
PackedSetWZero
|
||||
PackedMin
|
||||
PackedMax
|
||||
PackedLogicalOr
|
||||
PackedLogicalAnd
|
||||
PackedLogicalNot
|
||||
PackedMoveHighLow
|
||||
PackedMoveLowHigh
|
||||
PackedUnpackLow
|
||||
PackedUnpackHigh
|
||||
PackedUnpackLowPair
|
||||
PackedUnpackHighPair
|
||||
DoubleFPMoves
|
||||
DoubleFPOperations
|
||||
Int32ToDoubleConversion
|
||||
Int64ToDoubleConversion
|
||||
DoubleToInt64Conversion
|
||||
TestObjectCompare
|
||||
TestNop
|
||||
TestAlign0
|
||||
TestAlign1
|
||||
TestAlign1Offset1
|
||||
TestAlignLarge
|
||||
TestAdds
|
||||
TestNot
|
||||
TestNotInt32
|
||||
XorpdZeroing
|
||||
XorpdZeroing2
|
||||
Pxor
|
||||
SquareRootDouble
|
||||
DoubleFPUStackMoves
|
||||
Sine
|
||||
Cosine
|
||||
IntToDoubleConversion
|
||||
DoubleToDoubleTrunc
|
||||
DoubleAbs
|
||||
ExtractSignBits
|
||||
TestSetCC
|
||||
TestRepMovsBytes
|
||||
ConditionalMovesCompare
|
||||
BitTest
|
||||
ConditionalMovesEqual
|
||||
ConditionalMovesNoOverflow
|
||||
Assert
|
||||
Expect
|
||||
Fail0
|
||||
Fail1
|
||||
Fail2
|
||||
AstPrinter
|
||||
Ast
|
||||
FetchAndIncrement
|
||||
FetchAndDecrement
|
||||
IncrementBy
|
||||
DecrementBy
|
||||
LoadRelaxed
|
||||
CompareAndSwapWord
|
||||
CompareAndSwapUint32
|
||||
BigintSmi
|
||||
BigintInt64
|
||||
BigintUint64
|
||||
BigintDouble
|
||||
BigintHexStrings
|
||||
BigintDecStrings
|
||||
BigintCompare
|
||||
BigintDecimalStrings
|
||||
BitSetBasic
|
||||
BitVector
|
||||
BitFields
|
||||
BitmapBuilder
|
||||
BoolField
|
||||
ClassHierarchyAnalysis
|
||||
ClassFinalizer
|
||||
ClassFinalize_Cycles
|
||||
ClassFinalize_Resolve
|
||||
StackmapCodegen
|
||||
StackmapGC
|
||||
DescriptorList_TokenPositions
|
||||
CodeSourceMap_TokenPositions
|
||||
SimpleReturnCodegen
|
||||
SmiReturnCodegen
|
||||
SimpleStaticCallCodegen
|
||||
StaticCallReturnParameterCodegen
|
||||
StaticCallSmiParamSumCodegen
|
||||
SmiAddCodegen
|
||||
GenericAddCodegen
|
||||
SmiBinaryOpCodegen
|
||||
BoolNotCodegen
|
||||
BoolAndCodegen
|
||||
BinaryOpCodegen
|
||||
SmiUnaryOpCodegen
|
||||
DoubleUnaryOpCodegen
|
||||
StaticCallCodegen
|
||||
InstanceCallCodegen
|
||||
AllocateNewObjectCodegen
|
||||
IcDataAccess
|
||||
CompileScript
|
||||
CompileFunction
|
||||
CompileFunctionOnHelperThread
|
||||
RegenerateAllocStubs
|
||||
EvalExpression
|
||||
EvalExpressionWithLazyCompile
|
||||
EvalExpressionExhaustCIDs
|
||||
Id
|
||||
GetCpuModelTest
|
||||
CustomIsolates
|
||||
ErrorHandleBasics
|
||||
StacktraceInfo
|
||||
DeepStacktraceInfo
|
||||
StackOverflowStacktraceInfo
|
||||
OutOfMemoryStacktraceInfo
|
||||
CurrentStacktraceInfo
|
||||
ErrorHandleTypes
|
||||
UnhandleExceptionError
|
||||
Dart_PropagateError
|
||||
Dart_Error
|
||||
Null
|
||||
EmptyString
|
||||
IdentityEquals
|
||||
IdentityHash
|
||||
ObjectEquals
|
||||
InstanceValues
|
||||
InstanceGetType
|
||||
BooleanValues
|
||||
BooleanConstants
|
||||
DoubleValues
|
||||
NumberValues
|
||||
IntegerValues
|
||||
IntegerFitsIntoInt64
|
||||
IntegerFitsIntoUint64
|
||||
ArrayValues
|
||||
IsString
|
||||
NewString
|
||||
MalformedStringToUTF8
|
||||
ExternalStringCallback
|
||||
ExternalStringPretenure
|
||||
ExternalTypedDataPretenure
|
||||
ListAccess
|
||||
MapAccess
|
||||
IsFuture
|
||||
TypedDataViewListGetAsBytes
|
||||
TypedDataViewListIsTypedData
|
||||
TypedDataAccess
|
||||
ByteBufferAccess
|
||||
ByteDataAccess
|
||||
ExternalByteDataAccess
|
||||
OptimizedExternalByteDataAccess
|
||||
TypedDataDirectAccessUnverified
|
||||
TypedDataDirectAccessVerified
|
||||
TypedDataDirectAccess1Unverified
|
||||
TypedDataDirectAccess1Verified
|
||||
TypedDataViewDirectAccessUnverified
|
||||
TypedDataViewDirectAccessVerified
|
||||
ByteDataDirectAccessUnverified
|
||||
ByteDataDirectAccessVerified
|
||||
ExternalTypedDataAccess
|
||||
ExternalClampedTypedDataAccess
|
||||
ExternalUint8ClampedArrayAccess
|
||||
ExternalTypedDataCallback
|
||||
SlowFinalizer
|
||||
Float32x4List
|
||||
EnterExitScope
|
||||
PersistentHandles
|
||||
NewPersistentHandle_FromPersistentHandle
|
||||
AssignToPersistentHandle
|
||||
WeakPersistentHandle
|
||||
WeakPersistentHandleCallback
|
||||
WeakPersistentHandleNoCallback
|
||||
WeakPersistentHandlesCallbackShutdown
|
||||
WeakPersistentHandleExternalAllocationSize
|
||||
WeakPersistentHandleExternalAllocationSizeNewspaceGC
|
||||
WeakPersistentHandleExternalAllocationSizeOldspaceGC
|
||||
WeakPersistentHandleExternalAllocationSizeOddReferents
|
||||
ImplicitReferencesOldSpace
|
||||
ImplicitReferencesNewSpace
|
||||
SetGarbageCollectionCallbacks
|
||||
SingleGarbageCollectionCallback
|
||||
LocalHandles
|
||||
LocalZoneMemory
|
||||
Isolates
|
||||
CurrentIsolateData
|
||||
IsolateSetCheckedMode
|
||||
DebugName
|
||||
SetMessageCallbacks
|
||||
TypeGetNonParamtericTypes
|
||||
TypeGetParameterizedTypes
|
||||
FieldAccess
|
||||
SetField_FunnyValue
|
||||
InjectNativeFields1
|
||||
InjectNativeFields2
|
||||
InjectNativeFields3
|
||||
InjectNativeFields4
|
||||
TestNativeFieldsAccess
|
||||
InjectNativeFieldsSuperClass
|
||||
NativeFieldAccess
|
||||
ImplicitNativeFieldAccess
|
||||
NegativeNativeFieldAccess
|
||||
NegativeNativeFieldInIsolateMessage
|
||||
GetStaticField_RunsInitializer
|
||||
GetField_CheckIsolate
|
||||
SetField_CheckIsolate
|
||||
New
|
||||
New_Issue2971
|
||||
Invoke
|
||||
Invoke_PrivateStatic
|
||||
Invoke_FunnyArgs
|
||||
Invoke_Null
|
||||
InvokeNoSuchMethod
|
||||
Invoke_CrossLibrary
|
||||
InvokeClosure
|
||||
ThrowException
|
||||
GetNativeArguments
|
||||
GetNativeArgumentCount
|
||||
GetType
|
||||
InstanceOf
|
||||
LoadScript
|
||||
RootLibrary
|
||||
LoadScript_CompileError
|
||||
LookupLibrary
|
||||
LibraryName
|
||||
LibraryId
|
||||
LibraryUrl
|
||||
LibraryGetClassNames
|
||||
GetFunctionNames
|
||||
LibraryImportLibrary
|
||||
ImportLibraryWithPrefix
|
||||
LoadLibrary
|
||||
LoadLibrary_CompileError
|
||||
LoadSource
|
||||
LoadSource_LateLoad
|
||||
LoadPatch
|
||||
LoadPatchSignatureMismatch
|
||||
ParsePatchLibrary
|
||||
SetNativeResolver
|
||||
ImportLibrary2
|
||||
ImportLibrary3
|
||||
ImportLibrary4
|
||||
ImportLibrary5
|
||||
IllegalNewSendPort
|
||||
IllegalPost
|
||||
NewNativePort
|
||||
NativePortPostInteger
|
||||
NativePortReceiveNull
|
||||
NativePortReceiveInteger
|
||||
RunLoop_Success
|
||||
RunLoop_Exception
|
||||
IsolateShutdown
|
||||
IsolateShutdownRunDartCode
|
||||
NativeFunctionClosure
|
||||
NativeStaticFunctionClosure
|
||||
RangeLimits
|
||||
NewString_Null
|
||||
InvalidGetSetPeer
|
||||
OneNewSpacePeer
|
||||
CollectOneNewSpacePeer
|
||||
TwoNewSpacePeers
|
||||
CollectTwoNewSpacePeers
|
||||
CopyNewSpacePeers
|
||||
OnePromotedPeer
|
||||
OneOldSpacePeer
|
||||
CollectOneOldSpacePeer
|
||||
TwoOldSpacePeers
|
||||
CollectTwoOldSpacePeers
|
||||
MakeExternalString
|
||||
ExternalizeConstantStrings
|
||||
LazyLoadDeoptimizes
|
||||
GuardExternalizedString
|
||||
ExternalStringDeoptimize
|
||||
ExternalStringPolymorphicDeoptimize
|
||||
ExternalStringLoadElimination
|
||||
ExternalStringGuardFieldDeoptimize
|
||||
ExternalStringStaticFieldDeoptimize
|
||||
ExternalStringTrimDoubleParse
|
||||
ExternalStringDoubleParse
|
||||
ExternalStringIndexOf
|
||||
StringFromExternalTypedData
|
||||
Timeline_Dart_TimelineDuration
|
||||
Timeline_Dart_TimelineInstant
|
||||
Timeline_Dart_TimelineAsyncDisabled
|
||||
Timeline_Dart_TimelineAsync
|
||||
Timeline_Dart_TimelineGetTrace
|
||||
Timeline_Dart_TimelineGetTraceOnlyDartEvents
|
||||
Timeline_Dart_TimelineGetTraceWithDartEvents
|
||||
Timeline_Dart_TimelineGetTraceGlobalOverride
|
||||
Timeline_Dart_GlobalTimelineGetTrace
|
||||
Timeline_Dart_GlobalTimelineGetTrace_Threaded
|
||||
Timeline_Dart_EmbedderTimelineStartStopRecording
|
||||
Dart_LoadLibraryPatch_1
|
||||
Dart_LoadLibraryPatch_Error1
|
||||
Dart_LoadLibraryPatch_Error2
|
||||
Dart_LoadLibraryPatch_Error3
|
||||
DartEntry
|
||||
InvokeStatic_CompileError
|
||||
InvokeDynamic_CompileError
|
||||
Debugger_PrintBreakpointsToJSONArray
|
||||
Debugger_PauseEvent
|
||||
Debug_Breakpoint
|
||||
Debug_InspectStack_NotOptimized
|
||||
Debug_InspectStack_Optimized
|
||||
Debug_InspectStackWithClosure_NotOptimized
|
||||
Debug_InspectStackWithClosure_Optimized
|
||||
Debug_StepOut
|
||||
Debug_StepInto
|
||||
Debug_IgnoreBP
|
||||
Debug_DeoptimizeFunction
|
||||
Debug_SingleStep
|
||||
Debug_ClosureBreakpoint
|
||||
Debug_ExprClosureBreakpoint
|
||||
Debug_BreakpointStubPatching
|
||||
Debug_DeleteBreakpoint
|
||||
Debug_InspectStaticField
|
||||
Debug_InspectObject
|
||||
Debug_IsolateID
|
||||
Debug_InterruptIsolate
|
||||
Debug_StackTraceDump1
|
||||
Debug_StackTraceDump2
|
||||
Debug_EvaluateExpr
|
||||
Debug_EvaluateInActivationOfEvaluate
|
||||
Debug_BreakOnUnhandledException
|
||||
Debug_GetClosureInfo
|
||||
Debug_GetSupertype
|
||||
Debug_ListSuperType
|
||||
Debug_ScriptGetTokenInfo_Basic
|
||||
Debug_ScriptGetTokenInfo_MultiLineInterpolation
|
||||
Disassembler
|
||||
UnhandledExceptions
|
||||
FindCodeObject
|
||||
BasicFlags
|
||||
ParseFlags
|
||||
SourcePosition_InstanceCalls
|
||||
SourcePosition_If
|
||||
SourcePosition_ForLoop
|
||||
SourcePosition_While
|
||||
SourcePosition_WhileContinueBreak
|
||||
SourcePosition_LoadIndexed
|
||||
SourcePosition_StoreIndexed
|
||||
SourcePosition_BitwiseOperations
|
||||
SourcePosition_IfElse
|
||||
SourcePosition_Switch
|
||||
SourcePosition_TryCatchFinally
|
||||
SourcePosition_InstanceFields
|
||||
SourcePosition_Async
|
||||
SourcePosition_SyntheticTokens
|
||||
RangeTests
|
||||
RangeTestsInfinity
|
||||
RangeUtils
|
||||
RangeBinaryOp
|
||||
RangeAdd
|
||||
RangeSub
|
||||
RangeAnd
|
||||
RangeIntersectionMinMax
|
||||
RangeJoinMinMax
|
||||
FreeList
|
||||
FreeListProtected
|
||||
FreeListProtectedTinyObjects
|
||||
FreeListProtectedVariableSizeObjects
|
||||
GrowableArray
|
||||
MallocGrowableArray
|
||||
GrowableArraySort
|
||||
GrowableHandlePtr
|
||||
GuardFieldSimpleTest
|
||||
GuardFieldFinalListTest
|
||||
GuardFieldFinalVariableLengthListTest
|
||||
GuardFieldConstructorTest
|
||||
GuardFieldConstructor2Test
|
||||
AllocateZoneHandle
|
||||
AllocateScopeHandle
|
||||
DirectChainedHashMap
|
||||
MallocDirectChainedHashMap
|
||||
DirectChainedHashMapIterator
|
||||
HashTable
|
||||
Sets
|
||||
Maps
|
||||
OldGC
|
||||
OldGC_Unsync
|
||||
LargeSweep
|
||||
ClassHeapStats
|
||||
ArrayHeapStats
|
||||
FindObject
|
||||
IterateReadOnly
|
||||
BecomeFowardOldToOld
|
||||
BecomeFowardNewToNew
|
||||
BecomeFowardOldToNew
|
||||
BecomeFowardNewToOld
|
||||
BecomeForwardRememberedObject
|
||||
InstructionTests
|
||||
OptimizationTests
|
||||
IsolateReload_FunctionReplacement
|
||||
IsolateReload_BadClass
|
||||
IsolateReload_StaticValuePreserved
|
||||
IsolateReload_SavedClosure
|
||||
IsolateReload_TopLevelFieldAdded
|
||||
IsolateReload_ClassFieldAdded
|
||||
IsolateReload_ClassFieldAdded2
|
||||
IsolateReload_ClassFieldRemoved
|
||||
IsolateReload_ClassAdded
|
||||
IsolateReload_LibraryImportAdded
|
||||
IsolateReload_LibraryImportRemoved
|
||||
IsolateReload_LibraryDebuggable
|
||||
IsolateReload_ImplicitConstructorChanged
|
||||
IsolateReload_ConstructorChanged
|
||||
IsolateReload_SuperClassChanged
|
||||
IsolateReload_Generics
|
||||
IsolateReload_TypeIdentity
|
||||
IsolateReload_TypeIdentityGeneric
|
||||
IsolateReload_TypeIdentityParameter
|
||||
IsolateReload_MixinChanged
|
||||
IsolateReload_ComplexInheritanceChange
|
||||
IsolateReload_LiveStack
|
||||
IsolateReload_LibraryLookup
|
||||
IsolateReload_LibraryHide
|
||||
IsolateReload_LibraryShow
|
||||
IsolateReload_SmiFastPathStubs
|
||||
IsolateReload_ImportedMixinFunction
|
||||
IsolateReload_TopLevelParseError
|
||||
IsolateReload_PendingUnqualifiedCall_StaticToInstance
|
||||
IsolateReload_PendingUnqualifiedCall_InstanceToStatic
|
||||
IsolateReload_PendingConstructorCall_AbstractToConcrete
|
||||
IsolateReload_PendingConstructorCall_ConcreteToAbstract
|
||||
IsolateReload_PendingStaticCall_DefinedToNSM
|
||||
IsolateReload_PendingStaticCall_NSMToDefined
|
||||
IsolateReload_PendingSuperCall
|
||||
IsolateReload_EnumEquality
|
||||
IsolateReload_EnumIdentical
|
||||
IsolateReload_EnumReorderIdentical
|
||||
IsolateReload_EnumAddition
|
||||
IsolateReload_EnumToNotEnum
|
||||
IsolateReload_NotEnumToEnum
|
||||
IsolateReload_EnumDelete
|
||||
IsolateReload_EnumIdentityReload
|
||||
IsolateReload_ConstantIdentical
|
||||
IsolateReload_EnumValuesToString
|
||||
IsolateReload_DirectSubclasses_Success
|
||||
IsolateReload_DirectSubclasses_GhostSubclass
|
||||
IsolateReload_DirectSubclasses_Failure
|
||||
IsolateCurrent
|
||||
IsolateSpawn
|
||||
StackLimitInterrupts
|
||||
NoOOBMessageScope
|
||||
JSON_TextBuffer
|
||||
JSON_JSONStream_Primitives
|
||||
JSON_JSONStream_Array
|
||||
JSON_JSONStream_Object
|
||||
JSON_JSONStream_NestedObject
|
||||
JSON_JSONStream_ObjectArray
|
||||
JSON_JSONStream_ArrayArray
|
||||
JSON_JSONStream_Printf
|
||||
JSON_JSONStream_ObjectPrintf
|
||||
JSON_JSONStream_DartObject
|
||||
JSON_JSONStream_EscapedString
|
||||
JSON_JSONStream_DartString
|
||||
JSON_JSONStream_Params
|
||||
JSON_JSONStream_AppendJSONStreamConsumer
|
||||
Log_Macro
|
||||
Log_Basic
|
||||
Log_Block
|
||||
LongJump
|
||||
NullRegion
|
||||
NewRegion
|
||||
Subregion
|
||||
ExtendedRegion
|
||||
MessageHandler_PostMessage
|
||||
MessageHandler_HasOOBMessages
|
||||
MessageHandler_ClosePort
|
||||
MessageHandler_CloseAllPorts
|
||||
MessageHandler_HandleNextMessage
|
||||
MessageHandler_HandleNextMessage_ProcessOOBAfterError
|
||||
MessageHandler_HandleNextMessage_Shutdown
|
||||
MessageHandler_HandleOOBMessages
|
||||
MessageHandler_Run
|
||||
MessageQueue_BasicOperations
|
||||
MessageQueue_Clear
|
||||
Metric_Simple
|
||||
Metric_OnDemand
|
||||
ObjectGraph
|
||||
ObjectIdRingSerialWrapTest
|
||||
ObjectIdRingScavengeMoveTest
|
||||
ObjectIdRingOldGCTest
|
||||
ObjectIdRingExpiredEntryTest
|
||||
Class
|
||||
TypeArguments
|
||||
TokenStream
|
||||
GenerateExactSource
|
||||
Class_ComputeEndTokenPos
|
||||
InstanceClass
|
||||
Smi
|
||||
StringCompareTo
|
||||
StringEncodeIRI
|
||||
StringDecodeIRI
|
||||
StringDecodeIRIInvalid
|
||||
StringIRITwoByte
|
||||
Mint
|
||||
Double
|
||||
Bigint
|
||||
Integer
|
||||
String
|
||||
StringFormat
|
||||
StringConcat
|
||||
StringHashConcat
|
||||
StringSubStringDifferentWidth
|
||||
StringFromUtf8Literal
|
||||
StringEqualsUtf8
|
||||
StringEqualsUTF32
|
||||
ExternalOneByteString
|
||||
EscapeSpecialCharactersOneByteString
|
||||
EscapeSpecialCharactersExternalOneByteString
|
||||
EscapeSpecialCharactersTwoByteString
|
||||
EscapeSpecialCharactersExternalTwoByteString
|
||||
ExternalTwoByteString
|
||||
Symbol
|
||||
SymbolUnicode
|
||||
Bool
|
||||
Array
|
||||
ArrayLengthNegativeOne
|
||||
ArrayLengthSmiMin
|
||||
ArrayLengthOneTooMany
|
||||
ArrayLengthMaxElements
|
||||
Int8ListLengthNegativeOne
|
||||
Int8ListLengthSmiMin
|
||||
Int8ListLengthOneTooMany
|
||||
Int8ListLengthMaxElements
|
||||
StringCodePointIterator
|
||||
StringCodePointIteratorRange
|
||||
GrowableObjectArray
|
||||
InternalTypedData
|
||||
ExternalTypedData
|
||||
Script
|
||||
EmbeddedScript
|
||||
Context
|
||||
ContextScope
|
||||
Closure
|
||||
ObjectPrinting
|
||||
CheckedHandle
|
||||
Code
|
||||
CodeImmutability
|
||||
EmbedStringInCode
|
||||
EmbedSmiInCode
|
||||
EmbedSmiIn64BitCode
|
||||
ExceptionHandlers
|
||||
PcDescriptors
|
||||
PcDescriptorsLargeDeltas
|
||||
ClassDictionaryIterator
|
||||
ICData
|
||||
SubtypeTestCache
|
||||
FieldTests
|
||||
EqualsIgnoringPrivate
|
||||
ArrayNew_Overflow_Crash
|
||||
StackTraceFormat
|
||||
WeakProperty_PreserveCrossGen
|
||||
WeakProperty_PreserveRecurse
|
||||
WeakProperty_PreserveOne_NewSpace
|
||||
WeakProperty_PreserveTwo_NewSpace
|
||||
WeakProperty_PreserveTwoShared_NewSpace
|
||||
WeakProperty_PreserveOne_OldSpace
|
||||
WeakProperty_PreserveTwo_OldSpace
|
||||
WeakProperty_PreserveTwoShared_OldSpace
|
||||
WeakProperty_ClearOne_NewSpace
|
||||
WeakProperty_ClearTwoShared_NewSpace
|
||||
WeakProperty_ClearOne_OldSpace
|
||||
WeakProperty_ClearTwoShared_OldSpace
|
||||
MirrorReference
|
||||
FindClosureIndex
|
||||
FindInvocationDispatcherFunctionIndex
|
||||
Metadata
|
||||
FunctionSourceFingerprint
|
||||
FunctionWithBreakpointNotInlined
|
||||
SpecialClassesHaveEmptyArrays
|
||||
PrintJSON
|
||||
PrintJSONPrimitives
|
||||
InstanceEquality
|
||||
HashCode
|
||||
LinkedHashMap
|
||||
LinkedHashMap_iteration
|
||||
Symbols_FromConcatAll
|
||||
String_ScrubName
|
||||
Sleep
|
||||
SNPrint
|
||||
SNPrint_BadArgs
|
||||
OsFuncs
|
||||
OSAlignedAllocate
|
||||
Pages
|
||||
ParseClassDefinition
|
||||
Parser_TopLevel
|
||||
Parser_AllocateVariables_CapturedVar
|
||||
Parser_AllocateVariables_NestedCapturedVar
|
||||
Parser_AllocateVariables_TwoChains
|
||||
Parser_AllocateVariables_Issue7681
|
||||
Parser_AllocateVariables_CaptureLoopVar
|
||||
Parser_AllocateVariables_MiddleChain
|
||||
PortMap_CreateAndCloseOnePort
|
||||
PortMap_CreateAndCloseTwoPorts
|
||||
PortMap_ClosePorts
|
||||
PortMap_CreateManyPorts
|
||||
PortMap_SetPortState
|
||||
PortMap_PostMessage
|
||||
PortMap_PostIntegerMessage
|
||||
PortMap_PostNullMessage
|
||||
PortMap_PostMessageClosedPort
|
||||
Profiler_SampleBufferWrapTest
|
||||
Profiler_SampleBufferIterateTest
|
||||
Profiler_AllocationSampleTest
|
||||
Profiler_TrivialRecordAllocation
|
||||
Profiler_ToggleRecordAllocation
|
||||
Profiler_CodeTicks
|
||||
Profiler_FunctionTicks
|
||||
Profiler_IntrinsicAllocation
|
||||
Profiler_ArrayAllocation
|
||||
Profiler_ContextAllocation
|
||||
Profiler_ClosureAllocation
|
||||
Profiler_TypedArrayAllocation
|
||||
Profiler_StringAllocation
|
||||
Profiler_StringInterpolation
|
||||
Profiler_FunctionInline
|
||||
Profiler_InliningIntervalBoundry
|
||||
Profiler_ChainedSamples
|
||||
Profiler_BasicSourcePosition
|
||||
Profiler_BasicSourcePositionOptimized
|
||||
Profiler_SourcePosition
|
||||
Profiler_SourcePositionOptimized
|
||||
Profiler_BinaryOperatorSourcePosition
|
||||
Profiler_BinaryOperatorSourcePositionOptimized
|
||||
Profiler_GetSourceReport
|
||||
RegExp_OneByteString
|
||||
RegExp_TwoByteString
|
||||
RegExp_ExternalOneByteString
|
||||
RegExp_ExternalTwoByteString
|
||||
DartStaticResolve
|
||||
DartDynamicResolve
|
||||
RingBuffer
|
||||
Scanner_Test
|
||||
ZeroSizeScavenger
|
||||
LocalScope
|
||||
Service_IdZones
|
||||
Service_Code
|
||||
Service_TokenStream
|
||||
Service_PcDescriptors
|
||||
Service_LocalVarDescriptors
|
||||
Service_PersistentHandles
|
||||
Service_Address
|
||||
Service_EmbedderRootHandler
|
||||
Service_EmbedderIsolateHandler
|
||||
Service_Profile
|
||||
SerializeNull
|
||||
SerializeSmi1
|
||||
SerializeSmi2
|
||||
SerializeMints
|
||||
SerializeDouble
|
||||
SerializeTrue
|
||||
SerializeFalse
|
||||
SerializeCapability
|
||||
SerializeBigint
|
||||
SerializeBigint2
|
||||
SerializeSingletons
|
||||
SerializeString
|
||||
SerializeArray
|
||||
FailSerializeLargeArray
|
||||
FailSerializeLargeNestedArray
|
||||
FailSerializeLargeTypedDataInt8
|
||||
FailSerializeLargeTypedDataUint8
|
||||
FailSerializeLargeExternalTypedData
|
||||
SerializeEmptyArray
|
||||
SerializeByteArray
|
||||
SerializeTypedArray
|
||||
SerializeExternalTypedArray
|
||||
SerializeEmptyByteArray
|
||||
SerializeScript
|
||||
CanonicalizationInScriptSnapshots
|
||||
GenerateSource
|
||||
FullSnapshot
|
||||
FullSnapshot1
|
||||
ScriptSnapshot
|
||||
ScriptSnapshot1
|
||||
ScriptSnapshot2
|
||||
IntArrayMessage
|
||||
DartGeneratedMessages
|
||||
DartGeneratedListMessages
|
||||
DartGeneratedArrayLiteralMessages
|
||||
DartGeneratedListMessagesWithBackref
|
||||
DartGeneratedArrayLiteralMessagesWithBackref
|
||||
DartGeneratedListMessagesWithTypedData
|
||||
PostCObject
|
||||
OmittedObjectEncodingLength
|
||||
SourceReport_Coverage_NoCalls
|
||||
SourceReport_Coverage_SimpleCall
|
||||
SourceReport_Coverage_ForceCompile
|
||||
SourceReport_Coverage_UnusedClass_NoForceCompile
|
||||
SourceReport_Coverage_UnusedClass_ForceCompile
|
||||
SourceReport_Coverage_UnusedClass_ForceCompileError
|
||||
SourceReport_Coverage_NestedFunctions
|
||||
SourceReport_Coverage_RestrictedRange
|
||||
SourceReport_Coverage_AllFunctions
|
||||
SourceReport_Coverage_AllFunctions_ForceCompile
|
||||
SourceReport_CallSites_SimpleCall
|
||||
SourceReport_CallSites_PolymorphicCall
|
||||
SourceReport_MultipleReports
|
||||
SourceReport_PossibleBreakpoints_Simple
|
||||
EmptyStackFrameIteration
|
||||
EmptyDartStackFrameIteration
|
||||
ValidateStackFrameIteration
|
||||
ValidateNoSuchMethodStackFrameIteration
|
||||
CallRuntimeStubCode
|
||||
CallLeafRuntimeStubCode
|
||||
ThreadBarrier
|
||||
ThreadPool_Create
|
||||
ThreadPool_RunOne
|
||||
ThreadPool_RunMany
|
||||
ThreadPool_WorkerShutdown
|
||||
ThreadPool_WorkerTimeout
|
||||
ThreadPool_RecursiveSpawn
|
||||
Mutex
|
||||
Monitor
|
||||
ManyTasksWithZones
|
||||
ThreadRegistry
|
||||
SafepointTestDart
|
||||
SafepointTestVM
|
||||
RecursiveSafepointTest1
|
||||
ThreadIterator_Count
|
||||
ThreadIterator_FindSelf
|
||||
ThreadIterator_AddFindRemove
|
||||
SafepointTestVM2
|
||||
RecursiveSafepointTest2
|
||||
HelperAllocAndGC
|
||||
TimelineEventIsValid
|
||||
TimelineEventDuration
|
||||
TimelineEventDurationPrintJSON
|
||||
TimelineEventArguments
|
||||
TimelineEventArgumentsPrintJSON
|
||||
TimelineEventBufferPrintJSON
|
||||
TimelineEventCallbackRecorderBasic
|
||||
TimelineAnalysis_ThreadBlockCount
|
||||
TimelineRingRecorderJSONOrder
|
||||
TimelinePauses_Basic
|
||||
TimelinePauses_BeginEnd
|
||||
Utf8Decode
|
||||
ParseUri_WithScheme_NoQueryNoUser
|
||||
ParseUri_WithScheme_WithQuery
|
||||
ParseUri_WithScheme_WithFragment
|
||||
ParseUri_WithScheme_WithQueryWithFragment
|
||||
ParseUri_WithScheme_WithUser
|
||||
ParseUri_WithScheme_ShortPath
|
||||
ParseUri_WithScheme_EmptyPath
|
||||
ParseUri_WithScheme_Rootless1
|
||||
ParseUri_WithScheme_Rootless2
|
||||
ParseUri_NoScheme_AbsPath_WithAuthority
|
||||
ParseUri_NoScheme_AbsPath_NoAuthority
|
||||
ParseUri_NoScheme_AbsPath_StrayColon
|
||||
ParseUri_NoScheme_Rootless1
|
||||
ParseUri_NoScheme_Rootless2
|
||||
ParseUri_NoScheme_Empty
|
||||
ParseUri_NoScheme_QueryOnly
|
||||
ParseUri_NoScheme_FragmentOnly
|
||||
ParseUri_LowerCaseScheme
|
||||
ParseUri_NormalizeEscapes_PathQueryFragment
|
||||
ParseUri_NormalizeEscapes_UppercaseEscapesPreferred
|
||||
ParseUri_NormalizeEscapes_Authority
|
||||
ParseUri_NormalizeEscapes_UppercaseEscapeInHost
|
||||
ParseUri_BrokenEscapeSequence
|
||||
ResolveUri_WithScheme_NoAuthorityNoQuery
|
||||
ResolveUri_WithScheme_WithAuthorityWithQuery
|
||||
ResolveUri_NoScheme_WithAuthority
|
||||
ResolveUri_NoSchemeNoAuthority_AbsolutePath
|
||||
ResolveUri_NoSchemeNoAuthority_RelativePath
|
||||
ResolveUri_NoSchemeNoAuthority_RelativePathEmptyBasePath
|
||||
ResolveUri_NoSchemeNoAuthority_RelativePathWeirdBasePath
|
||||
ResolveUri_NoSchemeNoAuthority_EmptyPath
|
||||
ResolveUri_NoSchemeNoAuthority_EmptyPathWithQuery
|
||||
ResolveUri_NoSchemeNoAuthority_EmptyPathWithFragment
|
||||
ResolveUri_RemoveDots_RemoveOneDotSegment
|
||||
ResolveUri_RemoveDots_RemoveTwoDotSegments
|
||||
ResolveUri_RemoveDots_RemoveOneDotDotSegment
|
||||
ResolveUri_RemoveDots_RemoveTwoDotDotSegments
|
||||
ResolveUri_RemoveDots_RemoveTooManyDotDotSegments
|
||||
ResolveUri_RemoveDots_RemoveDotSegmentsNothingLeft1
|
||||
ResolveUri_RemoveDots_RemoveDotSegmentsNothingLeft2
|
||||
ResolveUri_RemoveDots_RemoveDotSegmentsInitialPrefix
|
||||
ResolveUri_RemoveDots_RemoveDotSegmentsMixed
|
||||
ResolveUri_NormalizeEscapes_PathQueryFragment
|
||||
ResolveUri_NormalizeEscapes_UppercaseHexPreferred
|
||||
ResolveUri_NormalizeEscapes_Authority
|
||||
ResolveUri_NormalizeEscapes_BrokenEscapeSequence
|
||||
ResolveUri_DataUri
|
||||
ResolveUri_RelativeBase_NotImplemented
|
||||
ResolveUri_TestUriPerRFCs
|
||||
ResolveUri_MoreDotSegmentTests
|
||||
Minimum
|
||||
Maximum
|
||||
IsPowerOfTwo
|
||||
ShiftForPowerOfTwo
|
||||
IsAligned
|
||||
RoundDown
|
||||
RoundUp
|
||||
RoundUpToPowerOfTwo
|
||||
CountOneBits
|
||||
CountZeros
|
||||
IsInt
|
||||
IsUint
|
||||
IsAbsoluteUint
|
||||
LowBits
|
||||
Endianity
|
||||
DoublesBitEqual
|
||||
AllocateVirtualMemory
|
||||
FreeVirtualMemory
|
||||
VirtualMemoryCommitPartial
|
||||
AllocateZone
|
||||
AllocGeneric_Success
|
||||
AllocGeneric_Overflow
|
||||
ZoneAllocated
|
||||
PrintToString
|
||||
CorelibCompileAll
|
||||
CorelibCompilerStats
|
||||
Dart2JSCompilerStats
|
||||
CorelibIsolateStartup
|
||||
UseDartApi
|
||||
DartStringAccess
|
||||
Dart2JSCompileAll
|
||||
FrameLookup
|
||||
CoreSnapshotSize
|
||||
StandaloneSnapshotSize
|
||||
CreateMirrorSystem
|
||||
EnterExitIsolate
|
||||
SerializeNull
|
||||
SerializeSmi
|
||||
SimpleMessage
|
||||
LargeMap
|
255
runtime/bin/run_vm_tests_fuchsia.cc
Normal file
255
runtime/bin/run_vm_tests_fuchsia.cc
Normal file
|
@ -0,0 +1,255 @@
|
|||
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <magenta/syscalls.h>
|
||||
#include <mxio/util.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// This program runs Dart VM unit tests. The Dart VM unit tests are contained
|
||||
// in a separate binary whose location is defined in kRunVmTestsPath below.
|
||||
// That program accepts a command line argument --list to list all the available
|
||||
// tests, or the name of a single test to run. This program accepts a single
|
||||
// command line argument which is the path to a file containing a list of tests
|
||||
// to run, one per line.
|
||||
|
||||
const char* kRunVmTestsPath = "/boot/bin/dart_vm_tests";
|
||||
|
||||
// Tests that are invalid, wedge, or cause panics.
|
||||
const char* kSkip[] = {
|
||||
// These expect a file to exist that we aren't putting in the image.
|
||||
"Read",
|
||||
"FileLength",
|
||||
"FilePosition",
|
||||
// Hangs.
|
||||
"ArrayLengthMaxElements",
|
||||
"Int8ListLengthMaxElements",
|
||||
"ThreadPool_WorkerShutdown",
|
||||
"LargeMap",
|
||||
"CompileFunctionOnHelperThread",
|
||||
// Kernel panic.
|
||||
"ThreadBarrier",
|
||||
// The profiler is turned off.
|
||||
"Profiler_AllocationSampleTest",
|
||||
"Profiler_ArrayAllocation",
|
||||
"Profiler_BasicSourcePosition",
|
||||
"Profiler_BasicSourcePositionOptimized",
|
||||
"Profiler_BinaryOperatorSourcePosition",
|
||||
"Profiler_BinaryOperatorSourcePositionOptimized",
|
||||
"Profiler_ChainedSamples",
|
||||
"Profiler_ClosureAllocation",
|
||||
"Profiler_CodeTicks",
|
||||
"Profiler_ContextAllocation",
|
||||
"Profiler_FunctionInline",
|
||||
"Profiler_FunctionTicks",
|
||||
"Profiler_InliningIntervalBoundry",
|
||||
"Profiler_IntrinsicAllocation",
|
||||
"Profiler_SampleBufferIterateTest",
|
||||
"Profiler_SampleBufferWrapTest",
|
||||
"Profiler_SourcePosition",
|
||||
"Profiler_SourcePositionOptimized",
|
||||
"Profiler_StringAllocation",
|
||||
"Profiler_StringInterpolation",
|
||||
"Profiler_ToggleRecordAllocation",
|
||||
"Profiler_TrivialRecordAllocation",
|
||||
"Profiler_TypedArrayAllocation",
|
||||
"Profiler_GetSourceReport",
|
||||
"Service_Profile",
|
||||
// No realpath.
|
||||
"Dart2JSCompilerStats",
|
||||
"Dart2JSCompileAll",
|
||||
};
|
||||
|
||||
// Expected to fail/crash.
|
||||
const char* kExpectFail[] = {
|
||||
"Fail0",
|
||||
"Fail1",
|
||||
"Fail2",
|
||||
"IsolateReload_PendingUnqualifiedCall_InstanceToStatic",
|
||||
"IsolateReload_PendingUnqualifiedCall_StaticToInstance",
|
||||
"IsolateReload_PendingConstructorCall_AbstractToConcrete",
|
||||
"IsolateReload_PendingConstructorCall_ConcreteToAbstract",
|
||||
"IsolateReload_PendingStaticCall_DefinedToNSM",
|
||||
"IsolateReload_PendingStaticCall_NSMToDefined",
|
||||
"ArrayNew_Overflow_Crash",
|
||||
"AllocGeneric_Overflow",
|
||||
"CodeImmutability",
|
||||
"SNPrint_BadArgs",
|
||||
};
|
||||
|
||||
// Bugs to fix, or things that are not yet impelemnted.
|
||||
const char* kBugs[] = {
|
||||
// pthreads not using specified stack size.
|
||||
"StackOverflowStacktraceInfo",
|
||||
// Needs OS::GetCurrentThreadCPUMicros.
|
||||
"Timeline_Dart_TimelineDuration",
|
||||
"Timeline_Dart_TimelineInstant"
|
||||
"Timeline_Dart_TimelineAsyncDisabled",
|
||||
"Timeline_Dart_TimelineAsync",
|
||||
"Timeline_Dart_TimelineGetTrace",
|
||||
"Timeline_Dart_TimelineGetTraceOnlyDartEvents",
|
||||
"Timeline_Dart_TimelineGetTraceWithDartEvents",
|
||||
"Timeline_Dart_TimelineGetTraceGlobalOverride",
|
||||
"Timeline_Dart_GlobalTimelineGetTrace",
|
||||
"Timeline_Dart_GlobalTimelineGetTrace_Threaded",
|
||||
"TimelineEventDuration",
|
||||
"TimelineEventDurationPrintJSON",
|
||||
"TimelineEventArguments",
|
||||
"TimelineEventArgumentsPrintJSON",
|
||||
"TimelineEventBufferPrintJSON",
|
||||
"TimelineEventCallbackRecorderBasic",
|
||||
"TimelineAnalysis_ThreadBlockCount",
|
||||
"TimelineRingRecorderJSONOrder",
|
||||
"TimelinePauses_BeginEnd",
|
||||
// Crash.
|
||||
"FindCodeObject",
|
||||
// Needs OS::Sleep.
|
||||
"MessageHandler_Run",
|
||||
"Sleep",
|
||||
// Calls VirtualMemory::FreeSubSegment.
|
||||
"GrowableObjectArray",
|
||||
"PrintJSON",
|
||||
"GenerateSource",
|
||||
"FreeVirtualMemory",
|
||||
// Several missing calls.
|
||||
"OsFuncs",
|
||||
// OS::AlignedAllocate.
|
||||
"OSAlignedAllocate",
|
||||
// Needs NativeSymbolResolver
|
||||
"Service_PersistentHandles",
|
||||
// Need to investigate:
|
||||
"ThreadPool_RunOne",
|
||||
"ThreadPool_WorkerTimeout",
|
||||
"Monitor",
|
||||
"ThreadIterator_AddFindRemove",
|
||||
// Needs Utils::HostToBigEndian16
|
||||
"Endianity",
|
||||
};
|
||||
|
||||
|
||||
static bool contains(const char** list, intptr_t len, const char* str) {
|
||||
for (intptr_t i = 0; i < len; i++) {
|
||||
if (strcmp(list[i], str) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static bool isSkip(const char* test) {
|
||||
return contains(
|
||||
kSkip, sizeof(kSkip) / sizeof(kSkip[0]), test);
|
||||
}
|
||||
|
||||
|
||||
static bool isExpectFail(const char* test) {
|
||||
return contains(
|
||||
kExpectFail, sizeof(kExpectFail) / sizeof(kExpectFail[0]), test);
|
||||
}
|
||||
|
||||
|
||||
static bool isBug(const char* test) {
|
||||
return contains(kBugs, sizeof(kBugs) / sizeof(kBugs[0]), test);
|
||||
}
|
||||
|
||||
|
||||
static int run_test(const char* test_name) {
|
||||
const intptr_t kArgc = 2;
|
||||
const char* argv[3];
|
||||
argv[0] = kRunVmTestsPath;
|
||||
argv[1] = test_name;
|
||||
|
||||
mx_handle_t p = mxio_start_process(argv[0], kArgc, argv);
|
||||
if (p < 0) {
|
||||
printf("process failed to start\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mx_signals_state_t state;
|
||||
mx_status_t r = mx_handle_wait_one(
|
||||
p, MX_SIGNAL_SIGNALED, MX_TIME_INFINITE, &state);
|
||||
if (r != NO_ERROR) {
|
||||
printf("[process(%x): wait failed? %d]\n", p, r);
|
||||
return -1;
|
||||
}
|
||||
|
||||
mx_process_info_t proc_info;
|
||||
mx_ssize_t ret = mx_handle_get_info(
|
||||
p, MX_INFO_PROCESS, &proc_info, sizeof(proc_info));
|
||||
if (ret != sizeof(proc_info)) {
|
||||
printf("[process(%x): handle_get_info failed? %ld]\n", p, ret);
|
||||
return -1;
|
||||
}
|
||||
|
||||
mx_handle_close(p);
|
||||
return proc_info.return_code;
|
||||
}
|
||||
|
||||
|
||||
static void trim(char* line) {
|
||||
const intptr_t line_len = strlen(line);
|
||||
if (line[line_len - 1] == '\n') {
|
||||
line[line_len - 1] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static bool should_run(const char* test) {
|
||||
return !(test[0] == '#') && !isSkip(test);
|
||||
}
|
||||
|
||||
|
||||
static void handle_result(intptr_t result, const char* test) {
|
||||
if (result != 0) {
|
||||
if (!isExpectFail(test) && !isBug(test)) {
|
||||
printf("******** Test %s FAILED\n", test);
|
||||
}
|
||||
} else {
|
||||
if (isExpectFail(test)) {
|
||||
printf("******** Test %s is expected to fail, but PASSED\n", test);
|
||||
}
|
||||
if (isBug(test)) {
|
||||
printf("******** Test %s is marked as a bug, but PASSED\n", test);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
if (argc <= 1) {
|
||||
fprintf(stderr, "Pass the path to a file containing the list of tests\n");
|
||||
return -1;
|
||||
}
|
||||
const char* tests_path = argv[1];
|
||||
|
||||
FILE* fp = fopen(tests_path, "r");
|
||||
if (fp == NULL) {
|
||||
fprintf(stderr, "Failed to read the file: %s\n", tests_path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
char* test = NULL;
|
||||
size_t len = 0;
|
||||
ssize_t read;
|
||||
while ((read = getline(&test, &len, fp)) != -1) {
|
||||
trim(test);
|
||||
if (!should_run(test)) {
|
||||
continue;
|
||||
}
|
||||
intptr_t result = run_test(test);
|
||||
handle_result(result, test);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
if (test != NULL) {
|
||||
free(test);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
2
runtime/tools/create_string_literal.py
Normal file → Executable file
2
runtime/tools/create_string_literal.py
Normal file → Executable file
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
||||
# for details. All rights reserved. Use of this source code is governed by a
|
||||
# BSD-style license that can be found in the LICENSE file.
|
||||
|
|
|
@ -45,17 +45,18 @@ static_library("libdart_platform") {
|
|||
]
|
||||
}
|
||||
|
||||
|
||||
vm_sources_list = exec_script("../../tools/gypi_to_gn.py",
|
||||
[rebase_path("vm_sources.gypi")],
|
||||
"scope",
|
||||
["vm_sources.gypi"])
|
||||
|
||||
|
||||
static_library("libdart_vm") {
|
||||
configs += ["..:dart_config",
|
||||
"..:dart_product_config",
|
||||
"..:dart_precompiled_runtime_config"]
|
||||
public_configs = [":libdart_vm_config"]
|
||||
|
||||
vm_sources_list = exec_script("../../tools/gypi_to_gn.py",
|
||||
[rebase_path("vm_sources.gypi")],
|
||||
"scope",
|
||||
["vm_sources.gypi"])
|
||||
|
||||
set_sources_assignment_filter(["*_test.cc", "*_test.h"])
|
||||
sources = vm_sources_list.sources
|
||||
include_dirs = [
|
||||
|
@ -70,11 +71,6 @@ static_library("libdart_vm_nosnapshot") {
|
|||
"..:dart_precompiled_runtime_config"]
|
||||
public_configs = [":libdart_vm_config"]
|
||||
defines = [ "DART_NO_SNAPSHOT" ]
|
||||
vm_sources_list = exec_script("../../tools/gypi_to_gn.py",
|
||||
[rebase_path("vm_sources.gypi")],
|
||||
"scope",
|
||||
["vm_sources.gypi"])
|
||||
|
||||
set_sources_assignment_filter(["*_test.cc", "*_test.h"])
|
||||
sources = vm_sources_list.sources
|
||||
include_dirs = [
|
||||
|
@ -89,11 +85,6 @@ static_library("libdart_vm_nosnapshot_with_precompiler") {
|
|||
"..:dart_precompiler_config"]
|
||||
public_configs = [":libdart_vm_config"]
|
||||
defines = [ "DART_NO_SNAPSHOT" ]
|
||||
vm_sources_list = exec_script("../../tools/gypi_to_gn.py",
|
||||
[rebase_path("vm_sources.gypi")],
|
||||
"scope",
|
||||
["vm_sources.gypi"])
|
||||
|
||||
set_sources_assignment_filter(["*_test.cc", "*_test.h"])
|
||||
sources = vm_sources_list.sources
|
||||
include_dirs = [
|
||||
|
|
|
@ -129,10 +129,28 @@ def ReplaceSubstrings(values, search_for, replace_with):
|
|||
# Assume everything else is unchanged.
|
||||
return values
|
||||
|
||||
def KeepOnly(values, filters):
|
||||
"""Recursively filters out strings not ending in "f" from "values"""
|
||||
|
||||
if isinstance(values, list):
|
||||
return [v for v in values if v.endswith(tuple(filters))]
|
||||
|
||||
if isinstance(values, dict):
|
||||
result = {}
|
||||
for key, value in values.items():
|
||||
new_key = KeepOnly(key, filters)
|
||||
new_value = KeepOnly(value, filters)
|
||||
result[new_key] = new_value
|
||||
return result
|
||||
|
||||
return values
|
||||
|
||||
def main():
|
||||
parser = OptionParser()
|
||||
parser.add_option("-r", "--replace", action="append",
|
||||
help="Replaces substrings. If passed a=b, replaces all substrs a with b.")
|
||||
parser.add_option("-k", "--keep_only", default = [], action="append",
|
||||
help="Keeps only files ending with the listed strings.")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if len(args) != 1:
|
||||
|
@ -149,6 +167,9 @@ def main():
|
|||
assert len(split) == 2, "Replacement must be of the form 'key=value'."
|
||||
data = ReplaceSubstrings(data, split[0], split[1])
|
||||
|
||||
if options.keep_only != []:
|
||||
data = KeepOnly(data, options.keep_only)
|
||||
|
||||
# Sometimes .gypi files use the GYP syntax with percents at the end of the
|
||||
# variable name (to indicate not to overwrite a previously-defined value):
|
||||
# 'foo%': 'bar',
|
||||
|
|
Loading…
Reference in a new issue