mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-25 15:05:55 +01:00
test: detect OS consistently using platform.system()
This commit is contained in:
@@ -12,6 +12,7 @@ import http.client
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
@@ -19,7 +20,6 @@ import time
|
||||
import urllib.parse
|
||||
import collections
|
||||
import shlex
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from .authproxy import (
|
||||
@@ -567,7 +567,7 @@ class TestNode():
|
||||
cmd, shell=True,
|
||||
stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL) == 0
|
||||
|
||||
if not sys.platform.startswith('linux'):
|
||||
if platform.system() != 'Linux':
|
||||
self.log.warning("Can't profile with perf; only available on Linux platforms")
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user