Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2533d40 authored by Chris Manton's avatar Chris Manton
Browse files

Update mockcify.pl ==> 0.7.1

Bug: 327761592
Test: m .
Flag: EXEMPT, Test Infrastructure

Change-Id: I8950c552371b30e6de48dd090347c7a4a5c5f49c
parent 3cb82862
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@ use File::Basename;

## mockcify version
##
## 0.7.1 Add tBTA_JV_STATUS return value
##       Remove unused compiler definition HAS_NO_BDROID_BUILDCFG
##
## 0.7.0 Comment out unused mock variables
##
## 0.6.3 Streamline inclusion for headers and source
@@ -44,7 +47,7 @@ use File::Basename;
##
## 0.2.0 First version
##
my $VERSION = "0.7.0";
my $VERSION = "0.7.1";

use diagnostics;
use strict;
@@ -257,14 +260,14 @@ sub compilation_screen {
        "test/mock/",
        "types/",
    );
    my @defs = (
        "HAS_NO_BDROID_BUILDCFG",
    ## Any additional compiler definitions that may be required
    my @compiler_defs = (
    );

    my $link="test/mock/$hdr";
    unlink "$INCDIR/$link";
    symlink "$OUTDIR/$hdr", "$INCDIR/$link";
    system("$CC -c -std=c++20 -o /dev/null -D" . join(" -D", @defs) . " -I" . join(" -I", @incs) . " $OUTDIR/$src");
    system("$CC -c -std=c++20 -o /dev/null -D" . join(" -D", @compiler_defs) . " -I" . join(" -I", @incs) . " $OUTDIR/$src");
    my $rc = $?;
         ($? == 0)
         ? printf(STDERR "SUCCESS Compiled unit \'$src\'\n")
@@ -582,6 +585,8 @@ sub get_default_return_value_from_type {
    return "BTA_SDP_SUCCESS";
  } elsif(/tBTA_STATUS/) {
    return "BTA_SUCCESS";
  } elsif(/tBTA_JV_STATUS/) {
    return "tBTA_JV_STATUS::SUCCESS";
  } else {
    ## Decay to int type
    return "0";