code: def test_with_autotools() -> None:
      """Windows only test. No `--as-cran` check, only unittests. We don't want to manage
      the dependencies on Windows machine.
  
      """
      assert system() == "Windows"
      mingw_bin = get_mingw_bin()
      CXX = os.path.join(mingw_bin, "g++.exe")
      CC = os.path.join(mingw_bin, "gcc.exe")
      cmd = [R, "CMD", "INSTALL", str(os.path.curdir)]
      env = os.environ.copy()
      env.update(
          {"CC": CC, "CXX": CXX, "MAKEFLAGS": f"-j{os.cpu_count()}"}
      )
      subprocess.check_call(cmd, env=env)
      subprocess.check_call(
          [
              "R.exe",
              "-q",
              "-e",
              "library(testthat); setwd('tests'); source('testthat.R')",
          ]
      )
      subprocess.check_call(
          ["R.exe", "-q", "-e", "demo(runall, package = 'xgboost')"]
      )
  
file_path: xgboost/tests/ci_build/test_r_package.py
imports: import argparse
  import os
  import shutil
  import subprocess
  from io import StringIO
  from pathlib import Path
  from platform import system
  from test_utils import R_PACKAGE, ROOT, DirectoryExcursion, cd, print_time, record_time
label_desc: Use image node_id 7 for calling a global function with example usage: test_with_autotools() without return types