Github user xunzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1007#discussion_r87318874
  
    --- Diff: src/test/feature/gtest-parallel ---
    @@ -285,41 +354,42 @@ else:
     save_file = os.path.join(os.path.expanduser("~"), ".gtest-parallel-times")
     times = TestTimes(save_file)
     tests = []
    +#pull all the tests into test_map dict, in order to mark the failed test 
in FAILED log 
    +test_map = {} 
    +# mark the end of paralell test id by parallel_id
    +parallel_id = 0
    +
     for test_binary in binaries:
       command = [test_binary]
       if options.gtest_also_run_disabled_tests:
         command += ['--gtest_also_run_disabled_tests']
    -
       list_command = list(command)
    +  
    +  if options.gtest_schedule != '' and options.gtest_filter != '':
    +    sys.exit("Option input failure : gtest_schedule and gtest_filter can 
not use in the same time: \n")
    +    
    +  if options.gtest_schedule != '':
    +    (pcount, filter_test) = get_schedule(options.gtest_schedule)
    +    for i in range(0, len(filter_test)):
    --- End diff --
    
    It is like C-style, not pythonic. Use enumerate instead to make the code 
simple. You can implement this logic using less than 10 lines of code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to