[Lldb-commits] [PATCH] D62096: [lldb] [lit] Driver/TestConvenienceVariables.test requires Python

2019-05-18 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision.
mgorny added reviewers: labath, JDevlieghere, aprantl.

https://reviews.llvm.org/D62096

Files:
  lldb/lit/Driver/TestConvenienceVariables.test
  lldb/lit/lit.cfg.py


Index: lldb/lit/lit.cfg.py
===
--- lldb/lit/lit.cfg.py
+++ lldb/lit/lit.cfg.py
@@ -96,3 +96,6 @@
 config.available_features.add('native-cpu-%s' % x)
 else:
 lit_config.warning("lit-cpuid failed: %s" % err)
+
+if not config.lldb_disable_python:
+config.available_features.add('python')
Index: lldb/lit/Driver/TestConvenienceVariables.test
===
--- lldb/lit/Driver/TestConvenienceVariables.test
+++ lldb/lit/Driver/TestConvenienceVariables.test
@@ -1,3 +1,4 @@
+REQUIRES: python
 RUN: %build %p/Inputs/hello.cpp -o %t
 RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s
 
@@ -19,4 +20,4 @@
 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
 CHECK: hello.c
 CHECK: script lldb.frame.GetFunctionName()
-CHECK: main
\ No newline at end of file
+CHECK: main


Index: lldb/lit/lit.cfg.py
===
--- lldb/lit/lit.cfg.py
+++ lldb/lit/lit.cfg.py
@@ -96,3 +96,6 @@
 config.available_features.add('native-cpu-%s' % x)
 else:
 lit_config.warning("lit-cpuid failed: %s" % err)
+
+if not config.lldb_disable_python:
+config.available_features.add('python')
Index: lldb/lit/Driver/TestConvenienceVariables.test
===
--- lldb/lit/Driver/TestConvenienceVariables.test
+++ lldb/lit/Driver/TestConvenienceVariables.test
@@ -1,3 +1,4 @@
+REQUIRES: python
 RUN: %build %p/Inputs/hello.cpp -o %t
 RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s
 
@@ -19,4 +20,4 @@
 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
 CHECK: hello.c
 CHECK: script lldb.frame.GetFunctionName()
-CHECK: main
\ No newline at end of file
+CHECK: main
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D61687: Update Python tests for lldb-server on Windows

2019-05-18 Thread Aaron Smith via Phabricator via lldb-commits
asmith updated this revision to Diff 200160.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61687/new/

https://reviews.llvm.org/D61687

Files:
  packages/Python/lldbsuite/test/dotest.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py
  
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
  
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py
  packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
  packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubSetSID.py
  packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
  
packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
  
packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
  packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
  
packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
  
packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py

Index: packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
@@ -29,6 +29,7 @@
 kv_dict = self.parse_key_val_dict(context.get("key_vals_text"))
 self.assertEqual(expected_name, kv_dict.get("name"))
 
+@skipIfWindows # the test is not updated for Windows.
 @llgs_test
 def test(self):
 """ Make sure lldb-server can retrieve inferior thread name"""
Index: packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
@@ -81,6 +81,7 @@
 self.ignore_signals(signals_to_ignore)
 self.expect_exit_code(len(signals_to_ignore))
 
+@skipIfWindows # no signal support
 @llgs_test
 def test_default_signals_behavior(self):
 self.init_llgs_test()
Index: packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
@@ -926,6 +926,12 @@
 # Convert text pids to ints
 process_ids = [int(text_pid)
for text_pid in text_process_ids if text_pid != '']
+elif platform.system() == 'Windows':
+output = subprocess.check_output(
+"for /f \"tokens=2 delims=,\" %F in ('tasklist /nh /fi \"PID ne 0\" /fo csv') do @echo %~F", shell=True).decode("utf-8")
+text_process_ids = output.split('\n')[1:]
+process_ids = [int(text_pid)
+   for text_pid in text_process_ids if text_pid != '']
 # elif {your_platform_here}:
 #   fill in process_ids as a list of int type process IDs running on
 #   the local system.
Index: packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
@@ -39,6 +39,7 @@
 self.build()
 self.inferior_seg_fault_received(self.GDB_REMOTE_STOP_CODE_BAD_ACCESS)
 
+@skipIfWindows # No signal is sent on Windows.
 @llgs_test
 def test_inferior_seg_fault_received_llgs(self):
 self.init_llgs_test()
Index: packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
===
--- packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
+++ packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
@@ -37,6 +37,7 @@
 self.build()
 self.inferior_abort_received()
 
+@skipIfWindows # No signal is sent on Windows.
 @llgs_test
 # std::abort() on <= API 16 raises SIGSEGV - b.android.com/179836
 @expectedFailureA

[Lldb-commits] [lldb] r361114 - [lldb] [lit] Driver/TestConvenienceVariables.test requires Python

2019-05-18 Thread Michal Gorny via lldb-commits
Author: mgorny
Date: Sat May 18 23:05:31 2019
New Revision: 361114

URL: http://llvm.org/viewvc/llvm-project?rev=361114&view=rev
Log:
[lldb] [lit] Driver/TestConvenienceVariables.test requires Python

Differential Revision: https://reviews.llvm.org/D62096

Modified:
lldb/trunk/lit/Driver/TestConvenienceVariables.test
lldb/trunk/lit/lit.cfg.py

Modified: lldb/trunk/lit/Driver/TestConvenienceVariables.test
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Driver/TestConvenienceVariables.test?rev=361114&r1=361113&r2=361114&view=diff
==
--- lldb/trunk/lit/Driver/TestConvenienceVariables.test (original)
+++ lldb/trunk/lit/Driver/TestConvenienceVariables.test Sat May 18 23:05:31 2019
@@ -1,3 +1,4 @@
+REQUIRES: python
 RUN: %build %p/Inputs/hello.cpp -o %t
 RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s
 
@@ -19,4 +20,4 @@ CHECK: 8
 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
 CHECK: hello.c
 CHECK: script lldb.frame.GetFunctionName()
-CHECK: main
\ No newline at end of file
+CHECK: main

Modified: lldb/trunk/lit/lit.cfg.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/lit.cfg.py?rev=361114&r1=361113&r2=361114&view=diff
==
--- lldb/trunk/lit/lit.cfg.py (original)
+++ lldb/trunk/lit/lit.cfg.py Sat May 18 23:05:31 2019
@@ -96,3 +96,6 @@ if 'native' in config.available_features
 config.available_features.add('native-cpu-%s' % x)
 else:
 lit_config.warning("lit-cpuid failed: %s" % err)
+
+if not config.lldb_disable_python:
+config.available_features.add('python')


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D62096: [lldb] [lit] Driver/TestConvenienceVariables.test requires Python

2019-05-18 Thread Michał Górny via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL361114: [lldb] [lit] Driver/TestConvenienceVariables.test 
requires Python (authored by mgorny, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D62096?vs=200136&id=200170#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62096/new/

https://reviews.llvm.org/D62096

Files:
  lldb/trunk/lit/Driver/TestConvenienceVariables.test
  lldb/trunk/lit/lit.cfg.py


Index: lldb/trunk/lit/Driver/TestConvenienceVariables.test
===
--- lldb/trunk/lit/Driver/TestConvenienceVariables.test
+++ lldb/trunk/lit/Driver/TestConvenienceVariables.test
@@ -1,3 +1,4 @@
+REQUIRES: python
 RUN: %build %p/Inputs/hello.cpp -o %t
 RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s
 
@@ -19,4 +20,4 @@
 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
 CHECK: hello.c
 CHECK: script lldb.frame.GetFunctionName()
-CHECK: main
\ No newline at end of file
+CHECK: main
Index: lldb/trunk/lit/lit.cfg.py
===
--- lldb/trunk/lit/lit.cfg.py
+++ lldb/trunk/lit/lit.cfg.py
@@ -96,3 +96,6 @@
 config.available_features.add('native-cpu-%s' % x)
 else:
 lit_config.warning("lit-cpuid failed: %s" % err)
+
+if not config.lldb_disable_python:
+config.available_features.add('python')


Index: lldb/trunk/lit/Driver/TestConvenienceVariables.test
===
--- lldb/trunk/lit/Driver/TestConvenienceVariables.test
+++ lldb/trunk/lit/Driver/TestConvenienceVariables.test
@@ -1,3 +1,4 @@
+REQUIRES: python
 RUN: %build %p/Inputs/hello.cpp -o %t
 RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s
 
@@ -19,4 +20,4 @@
 CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
 CHECK: hello.c
 CHECK: script lldb.frame.GetFunctionName()
-CHECK: main
\ No newline at end of file
+CHECK: main
Index: lldb/trunk/lit/lit.cfg.py
===
--- lldb/trunk/lit/lit.cfg.py
+++ lldb/trunk/lit/lit.cfg.py
@@ -96,3 +96,6 @@
 config.available_features.add('native-cpu-%s' % x)
 else:
 lit_config.warning("lit-cpuid failed: %s" % err)
+
+if not config.lldb_disable_python:
+config.available_features.add('python')
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits